mirror of https://github.com/gorhill/uBlock.git
Discard whole filter with bad `csp=` content
Related discussion: - https://www.reddit.com/r/uBlockOrigin/comments/bshn7z/ uBO was just removing the bad option, while the whole filter needs to be discarded.
This commit is contained in:
parent
dafe5fd045
commit
fb6d69f543
|
@ -1990,12 +1990,14 @@ FilterParser.prototype.parseOptions = function(s) {
|
||||||
this.parsePartyOption(true, not);
|
this.parsePartyOption(true, not);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( opt.startsWith('csp=') ) {
|
if (
|
||||||
if ( opt.length > 4 && this.reBadCSP.test(opt) === false ) {
|
opt.startsWith('csp=') &&
|
||||||
this.parseTypeOption('data', not);
|
opt.length > 4 &&
|
||||||
this.dataType = 'csp';
|
this.reBadCSP.test(opt) === false
|
||||||
this.dataStr = opt.slice(4).trim();
|
) {
|
||||||
}
|
this.parseTypeOption('data', not);
|
||||||
|
this.dataType = 'csp';
|
||||||
|
this.dataStr = opt.slice(4).trim();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( opt === 'csp' && this.action === AllowAction ) {
|
if ( opt === 'csp' && this.action === AllowAction ) {
|
||||||
|
|
Loading…
Reference in New Issue