1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-21 18:02:34 +01:00

[mv3] Fix removeparam potentially causing invalid DNR rules

This commit is contained in:
Raymond Hill 2024-11-18 14:05:19 -05:00
parent 17e0a35650
commit f9ce06977d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -4652,11 +4652,13 @@ StaticNetFilteringEngine.prototype.dnrFromCompiled = function(op, context, ...ar
};
}
if ( rule.condition.resourceTypes === undefined ) {
rule.condition.resourceTypes = [
'main_frame',
'sub_frame',
'xmlhttprequest',
];
if ( rule.condition.excludedResourceTypes === undefined ) {
rule.condition.resourceTypes = [
'main_frame',
'sub_frame',
'xmlhttprequest',
];
}
}
// https://github.com/uBlockOrigin/uBOL-home/issues/140
// Mitigate until DNR API flaw is addressed by browser vendors