Skip to content

Commit

Permalink
Better parsing of hosts file system addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Aug 10, 2020
1 parent 6739718 commit 45f26d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/static-filtering-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const Parser = class {
this.netOptionsIterator = new NetOptionsIterator(this);
this.extOptionsIterator = new ExtOptionsIterator(this);
this.maxTokenLength = Number.MAX_SAFE_INTEGER;
this.reIsLocalhostRedirect = /(?:0\.0\.0\.0|(?:broadcast|local)host|local|ip6-\w+)\b/;
this.reIsLocalhostRedirect = /(?:0\.0\.0\.0|(?:broadcast|local)host|local|ip6-\w+)(?:[^\w.-]|$)/;
this.reHostname = /^[^\x00-\x24\x26-\x29\x2B\x2C\x2F\x3A-\x40\x5B-\x5E\x60\x7B-\x7F]+/;
this.reHostsSink = /^[\w-.:\[\]]+$/;
this.reHostsSource = /^[^\x00-\x24\x26-\x29\x2B\x2C\x2F\x3A-\x40\x5B-\x5E\x60\x7B-\x7F]+$/;
Expand Down

0 comments on commit 45f26d7

Please sign in to comment.