TechnikEmpire / HttpFilteringEngine

Transparent filtering TLS proxy.
Mozilla Public License 2.0
60 stars 33 forks source link

Anchored domains & addresses with $domain operator fail #93

Closed TechnikEmpire closed 7 years ago

TechnikEmpire commented 8 years ago

Anchored domains and addresses with the $domain=/~= operator(s) specified are currently not handled correctly. Fortunately for everything but adblocking, we don't really care. But in Easylist, such rules exist. To handle these correctly, we'll need to include the contents of the referer HTTP header in our arguments to HttpFilteringEngine::ShouldBlock, and then also pass it on to AbpFilter::IsMatch.

These rules also need to have the anchored domain or domain extracted from the anchored address (via some URI parsing code, which in the .NET framework consists of many thousands of lines of code, for reference) compared against the arguments specified in the $domain operator. The point of this comparison is to determine if the rule should have the $third-party flag added or not. This means that, only when used in conjunction with an anchored domain or address, the $domain operator takes on a whole new meaning, one that completely overlaps the $third-party operator. This makes the ABP filter syntax stupid, and as such this bug should be resolved by resolving #91.

TechnikEmpire commented 7 years ago

No longer an issue now that filtering is externalized.