Fix overzealous strict blocking (regression)

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/536

Regression from:
- 3f3a1543ea (diff-522a16ddeed280252d7c3a351261b441R2767)
This commit is contained in:
Raymond Hill 2019-04-21 09:17:31 -04:00
parent cb18ec54f0
commit 43ecffc295
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 6 deletions

View File

@ -50,7 +50,6 @@ const AnyParty = 0 << 2;
const FirstParty = 1 << 2;
const ThirdParty = 2 << 2;
const AnyType = 0 << 4;
const typeNameToTypeValue = {
'no_type': 0 << 4,
'stylesheet': 1 << 4,
@ -101,7 +100,6 @@ const typeValueToTypeName = {
20: 'unsupported'
};
const AnyTypeAnyParty = AnyType | AnyParty;
const BlockImportant = BlockAction | Important;
// ABP filters: https://adblockplus.org/en/filters
@ -2663,7 +2661,7 @@ FilterContainer.prototype.realmMatchString = function(
partyBits
) {
let bucket;
let catBits = realmBits | AnyTypeAnyParty;
let catBits = realmBits;
if ( (bucket = this.categories.get(catBits)) ) {
if ( this.matchTokens(bucket) ) {
this.catbitsRegister = catBits;
@ -2671,7 +2669,7 @@ FilterContainer.prototype.realmMatchString = function(
}
}
if ( partyBits !== 0 ) {
catBits = realmBits | AnyType | partyBits;
catBits = realmBits | partyBits;
if ( (bucket = this.categories.get(catBits)) ) {
if ( this.matchTokens(bucket) ) {
this.catbitsRegister = catBits;
@ -2680,7 +2678,7 @@ FilterContainer.prototype.realmMatchString = function(
}
}
if ( typeBits !== 0 ) {
catBits = realmBits | AnyParty | typeBits;
catBits = realmBits | typeBits;
if ( (bucket = this.categories.get(catBits)) ) {
if ( this.matchTokens(bucket) ) {
this.catbitsRegister = catBits;
@ -2758,7 +2756,7 @@ FilterContainer.prototype.matchStringExactType = function(fctxt, requestType) {
return 1;
}
// Block filters
if ( this.realmMatchString(BlockAction, typeBits, partyBits) ) {
if ( this.realmMatchStringExactType(BlockAction, typeBits, partyBits) ) {
// Exception filters
if ( this.realmMatchStringExactType(AllowAction, typeBits, partyBits) ) {
return 2;