Skip to content

Commit 7bf5ac0

Browse files
committed
Code review of commit 4b34d29
Related issue: - uBlockOrigin/uBlock-issues#778 Related commit: - 4b34d29 Mind that `report-uri` or `report-to` could be used somewhere in a hostname.
1 parent 82f345a commit 7bf5ac0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/static-net-filtering.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ const FilterParser = class {
20032003
this.reIsolateHostname = /^(\*?\.)?([^\x00-\x24\x26-\x2C\x2F\x3A-\x5E\x60\x7B-\x7F]+)(.*)/;
20042004
this.reHasUnicode = /[^\x00-\x7F]/;
20052005
this.reWebsocketAny = /^ws[s*]?(?::\/?\/?)?\*?$/;
2006-
this.reBadCSP = /\breport-(?:to|uri)\b/;
2006+
this.reBadCSP = /(?:=|;)\s*report-(?:to|uri)\b/;
20072007
this.reGoodToken = /[%0-9a-z]{1,}/g;
20082008
this.reSeparator = /[\/^]/;
20092009
this.reRegexToken = /[%0-9A-Za-z]{2,}/g;
@@ -2272,7 +2272,7 @@ const FilterParser = class {
22722272
continue;
22732273
}
22742274
// Used by Adguard:
2275-
// https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters?aid=16593#empty-modifier
2275+
// https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#empty-modifier
22762276
if ( opt === 'empty' || opt === 'mp4' ) {
22772277
if ( this.redirect !== 0 ) {
22782278
this.unsupported = true;

0 commit comments

Comments
 (0)