From e98a4b1aceab1724f407a2356fd8bce17bf77b22 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 1 Dec 2019 09:15:25 -0500 Subject: [PATCH] Discard `::` from parsed hosts files Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/800 --- src/js/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/storage.js b/src/js/storage.js index bbced09af..9eeec05b3 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -827,7 +827,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => { const reIsWhitespaceChar = /\s/; const reMaybeLocalIp = /^[\d:f]/; const reIsLocalhostRedirect = /\s+(?:0\.0\.0\.0|broadcasthost|localhost|local|ip6-\w+)\b/; - const reLocalIp = /^(?:0\.0\.0\.0|127\.0\.0\.1|::1|fe80::1%lo0)/; + const reLocalIp = /^(?:0\.0\.0\.0|127\.0\.0\.1|::1?|fe80::1%lo0)\s+/; const lineIter = new this.LineIterator(this.processDirectives(rawText)); while ( lineIter.eot() === false ) {