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);
|
||||
continue;
|
||||
}
|
||||
if ( opt.startsWith('csp=') ) {
|
||||
if ( opt.length > 4 && this.reBadCSP.test(opt) === false ) {
|
||||
this.parseTypeOption('data', not);
|
||||
this.dataType = 'csp';
|
||||
this.dataStr = opt.slice(4).trim();
|
||||
}
|
||||
if (
|
||||
opt.startsWith('csp=') &&
|
||||
opt.length > 4 &&
|
||||
this.reBadCSP.test(opt) === false
|
||||
) {
|
||||
this.parseTypeOption('data', not);
|
||||
this.dataType = 'csp';
|
||||
this.dataStr = opt.slice(4).trim();
|
||||
continue;
|
||||
}
|
||||
if ( opt === 'csp' && this.action === AllowAction ) {
|
||||
|
|
Loading…
Reference in New Issue