mirror of https://github.com/gorhill/uBlock.git
Fix the parsing of unsupported static network filter types
Related issue: - https://github.com/gorhill/uBlock/issues/2283 This is a regression causing the referenced issue to no longer be fixed. The regression was introduced when the new static filtering parser code was introduced in version 1.28.0: https://github.com/gorhill/uBlock/releases/tag/1.28.0
This commit is contained in:
parent
d7e8e16fc5
commit
391a5c99c7
|
@ -2380,7 +2380,6 @@ const NetOptionsIterator = class {
|
||||||
// Validate option according to context
|
// Validate option according to context
|
||||||
if (
|
if (
|
||||||
descriptor === undefined ||
|
descriptor === undefined ||
|
||||||
hasBits(descriptor, OPTNotSupported) ||
|
|
||||||
ltok !== lopt &&
|
ltok !== lopt &&
|
||||||
hasNoBits(descriptor, OPTCanNegate) ||
|
hasNoBits(descriptor, OPTCanNegate) ||
|
||||||
this.exception &&
|
this.exception &&
|
||||||
|
@ -2419,7 +2418,12 @@ const NetOptionsIterator = class {
|
||||||
// Accumulate description bits
|
// Accumulate description bits
|
||||||
allBits |= descriptor;
|
allBits |= descriptor;
|
||||||
// Mark slices in case of invalid filter option
|
// Mark slices in case of invalid filter option
|
||||||
if ( this.interactive && descriptor === OPTTokenInvalid ) {
|
if (
|
||||||
|
this.interactive && (
|
||||||
|
descriptor === OPTTokenInvalid ||
|
||||||
|
hasBits(descriptor, OPTNotSupported)
|
||||||
|
)
|
||||||
|
) {
|
||||||
this.parser.errorSlices(lopt, i);
|
this.parser.errorSlices(lopt, i);
|
||||||
}
|
}
|
||||||
// Store indices to raw slices, this will be used during iteration
|
// Store indices to raw slices, this will be used during iteration
|
||||||
|
|
Loading…
Reference in New Issue