mirror of https://github.com/gorhill/uBlock.git
All exceptions filters are exempt from requiring a trusted source
Related feedback: https://github.com/uBlockOrigin/uBlock-issues/discussions/2895#discussioncomment-7566154
This commit is contained in:
parent
1e05665bdc
commit
d2b8d990e6
|
@ -235,8 +235,10 @@ const normalizeRawFilter = function(parser, sourceIsTrusted = false) {
|
|||
if ( reng.aliases.has(token) ) {
|
||||
token = reng.aliases.get(token);
|
||||
}
|
||||
if ( sourceIsTrusted !== true && reng.tokenRequiresTrust(token) ) {
|
||||
return;
|
||||
if ( parser.isException() !== true ) {
|
||||
if ( sourceIsTrusted !== true ) {
|
||||
if ( reng.tokenRequiresTrust(token) ) { return; }
|
||||
}
|
||||
}
|
||||
args[0] = token.slice(0, -3);
|
||||
}
|
||||
|
|
|
@ -1481,7 +1481,7 @@ export class AstFilterParser {
|
|||
case NODE_TYPE_NET_OPTION_NAME_REPLACE: {
|
||||
realBad = abstractTypeCount || behaviorTypeCount || unredirectableTypeCount;
|
||||
if ( realBad ) { break; }
|
||||
if ( this.options.trustedSource !== true ) {
|
||||
if ( isException !== true && this.options.trustedSource !== true ) {
|
||||
this.astError = AST_ERROR_UNTRUSTED_SOURCE;
|
||||
realBad = true;
|
||||
break;
|
||||
|
@ -1496,7 +1496,7 @@ export class AstFilterParser {
|
|||
case NODE_TYPE_NET_OPTION_NAME_URLTRANSFORM:
|
||||
realBad = abstractTypeCount || behaviorTypeCount || unredirectableTypeCount;
|
||||
if ( realBad ) { break; }
|
||||
if ( this.options.trustedSource !== true ) {
|
||||
if ( isException !== true && this.options.trustedSource !== true ) {
|
||||
this.astError = AST_ERROR_UNTRUSTED_SOURCE;
|
||||
realBad = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue