Missing request types when allowlisted
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/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/exceptions/csp_genericblock
Actual behavior
The type of the following filter hits cannot be determined, since matchingMethod === "allowing"
but details.type === undefined
:
Test page | Request | Type | Filter |
---|---|---|---|
exceptions/document | /en/exceptions/document | DOCUMENT | @@testpages.adblockplus.org/en/exceptions/document$document |
exceptions/elemhide | /en/exceptions/elemhide | ELEMHIDE | @@testpages.adblockplus.org/en/exceptions/elemhide$elemhide |
exceptions/genericblock | /en/exceptions/genericblock | GENERICBLOCK | @@||testpages.adblockplus.org/en/exceptions/genericblock$genericblock |
exceptions/generichide | /en/exceptions/generichide | GENERICHIDE | @@||testpages.adblockplus.org/en/exceptions/generichide$generichide |
exceptions/sitekey | /sitekey-frame | DOCUMENT | @@$document,sitekey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANGtTstne7e8MbmDHDiMFkGbcuBgXmiVesGOG3gtYeM1EkrzVhBjGUvKXYE4GLFwqty3v5MuWWbvItUWBTYoVVsCAwEAAQ |
exceptions/csp_genericblock | /en/exceptions/csp_genericblock | GENERICBLOCK | @@||testpages.adblockplus.org^$genericblock |
Expected behavior
The filter hit type can be determined, as can be seen in the developer tools panel of Adblock Plus.
Further information
As pointed out in this comment, those types are different to other other content types, as there's no web extension API equivalent. They represent variants of allowlisting. Therefore "genericblock" relates to matchingMethod: "allowing"
the same way as "script" relates to matchingMethod: "request"
.
Because of that we'd need a way to determine the reason for why the request/frame got allowlisted, similarly to how we can already determine the reason for why the request got blocked.
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.