1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 18:19:38 +02:00

Better detect invalid network filter patterns

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2566
This commit is contained in:
Raymond Hill 2023-03-30 12:58:19 -04:00
parent 1835e90125
commit 42a00ec742
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1275,9 +1275,9 @@ export class AstFilterParser {
case NODE_TYPE_NET_OPTION_NAME_WEBRTC:
realBad = true;
break;
case NODE_TYPE_NET_PATTERN:
case NODE_TYPE_NET_PATTERN_RAW:
realBad = this.hasOptions() === false &&
this.getNodeStringLen(targetNode) === 1;
this.getNetPattern().length <= 1;
break;
default:
break;