Missing filter hit docDomain
Environment
- Browser and full version: Chrome 93.0.4577.63
- Extension using this toolkit: test-mv2
- Commit hash: 35978fd8
Steps to reproduce
- Run the following in the context of the extension's background page:
EWE.subscriptions.add("https://testpages.adblockplus.org/en/abp-testcase-subscription.txt");
EWE.reporting.onFilterMatch.addListener(console.log);
- Open the following test pages:
- https://testpages.adblockplus.org/en/filters/element-hiding
- https://testpages.adblockplus.org/en/filters/element-hiding-emulation
- https://testpages.adblockplus.org/en/exceptions/element-hiding
- https://testpages.adblockplus.org/en/exceptions/document
- https://testpages.adblockplus.org/en/exceptions/elemhide
- https://testpages.adblockplus.org/en/exceptions/genericblock
- https://testpages.adblockplus.org/en/exceptions/generichide
- https://testpages.adblockplus.org/en/exceptions/sitekey
- https://testpages.adblockplus.org/en/filters/csp_all
- https://testpages.adblockplus.org/en/filters/csp_specific
- https://testpages.adblockplus.org/en/exceptions/csp
- https://testpages.adblockplus.org/en/exceptions/csp_genericblock
- https://testpages.adblockplus.org/en/snippets/dir-string
Actual behavior
matchInfo.docDomain
of the following filter hits is not being passed:
Test page | Request | docDomain | Type | Filter |
---|---|---|---|---|
filters/element-hiding | (none) | testpages.adblockplus.org | ELEMHIDE | any element hiding filters |
filters/element-hiding-emulation | (none) | testpages.adblockplus.org | ELEMHIDE | any element hiding emulation filters |
exceptions/element-hiding | (none) | testpages.adblockplus.org | ELEMHIDE | testpages.adblockplus.org#@#.testcase-ehe |
exceptions/document | /en/exceptions/document | testpages.adblockplus.org | DOCUMENT | @@testpages.adblockplus.org/en/exceptions/document$document |
exceptions/elemhide | /en/exceptions/elemhide | testpages.adblockplus.org | ELEMHIDE | @@testpages.adblockplus.org/en/exceptions/elemhide$elemhide |
exceptions/genericblock | /en/exceptions/genericblock | testpages.adblockplus.org | GENERICBLOCK | @@||testpages.adblockplus.org/en/exceptions/genericblock$genericblock |
exceptions/generichide | /en/exceptions/generichide | testpages.adblockplus.org | GENERICHIDE | @@||testpages.adblockplus.org/en/exceptions/generichide$generichide |
exceptions/sitekey | /sitekey-frame | testpages.adblockplus.org | DOCUMENT | @@$document,sitekey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANGtTstne7e8MbmDHDiMFkGbcuBgXmiVesGOG3gtYeM1EkrzVhBjGUvKXYE4GLFwqty3v5MuWWbvItUWBTYoVVsCAwEAAQ |
filters/csp_all | /en/filters/csp_all | testpages.adblockplus.org | CSP | *$csp=script-src 'none' |
filters/csp_specific | /en/filters/csp_specific | testpages.adblockplus.org | CSP | ||testpages.adblockplus.org^$csp=script-src https://testpages.adblockplus.org/lib/utils.js |
exceptions/csp | /en/exceptions/csp | testpages.adblockplus.org | CSP | @@||testpages.adblockplus.org^$csp |
exceptions/csp_genericblock | /en/exceptions/csp_genericblock | testpages.adblockplus.org | GENERICBLOCK | @@||testpages.adblockplus.org^$genericblock |
snippets/dir-string | /en/snippets/dir-string | testpages.adblockplus.org | SNIPPET | testpages.adblockplus.org#$#dir-string |
Also note that snippet filters no longer pass a request URL anymore either, while element hiding filters now do.
Expected behavior
matchInfo.docDomain
is passed, as can be seen in the developer tools panel of Adblock Plus.
Further information
This list is likely incomplete, since I haven't gone through all test pages, and I haven't been able to manually reproduce all test cases.