Skip to content

URLs with many distinct segments fail to match #183

Open
@antonok-edm

Description

@antonok-edm

adblock-rust performs a rough matching step against requests by splitting the URL into tokens, hashing them, and then comparing against hashes from tokens in parsed filters.

There is an upper limit to the number of tokens that can be generated from a URL, after which point any additional tokens are ignored. This was likely put in place to limit the performance impact from maliciously crafted URLs.

As it turns out, this limit is insufficient for a small number of real-world requests.

See ghostery/adblocker#2125 (comment) for relevant test cases.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions