Opened 7 weeks ago

Last modified 7 weeks ago

#7437 new change

Create test page for $other filter option

Reported by: Ross Assignee:
Priority: P4 Milestone:
Module: Websites Keywords:
Cc: sebastian, arthur Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Background

A test page does not exist for testing if the $other filter option works.

According to MDN, resources marked Other are "Resources that aren't covered by any other available type." Looking through the Chrome source, Chrome marks resources as Other if their mimetype includes octet.

What to change

  • Create a new test page.
  • Add it to the list of test pages.

To investigate:

  • Have the test page make a request for some random binary data with the mimetype octet.

Change History (3)

comment:1 in reply to: ↑ description ; follow-up: Changed 7 weeks ago by sebastian

Replying to Ross:

According to MDN, resources marked Other are "Resources that aren't covered by any other available type."

Note that these are the resource types recognized by the browser. They don't map 1-to-1 to the request types used in Adblock Plus. All types Adblock Plus doesn't have a respective filter option for (i.e. csp_report, speculative, web_manifest, xbl, xml_dtd and xslt) also match $other.

Looking through the Chrome source, Chrome marks resources as Other if their mimetype includes octet.

Note that for most requests the resource type is determined by the context in which the resource is loaded (e.g. when loading an <img> element the type is always image) regardless which mime type was sent by the server.

Last edited 7 weeks ago by sebastian (previous) (diff)

comment:2 in reply to: ↑ 1 Changed 7 weeks ago by Ross

Replying to sebastian:

Replying to Ross:

Note that these are the resource types recognized by the browser. They don't map 1-to-1 to the request types used in Adblock Plus. All types Adblock Plus doesn't have a respective filter option for (i.e. csp_report, speculative, web_manifest, xbl, xml_dtd and xslt) also match $other.

Ah, okay that makes sense.

Note that for most requests the resource type is determined by the context in which the resource is loaded (e.g. when loading an <img> element the type is always image) regardless which mime type was sent by the server.

I'm aware of that.

I played around with this and my results were:

csp report:
Not allowed to use report-uri\report-to in a CSP <meta> tag. Haven't tried doing something with a header instead.

speculative:
I couldn't figure out how to trigger this type of request. I had a go with various preload entries but I think that's not what I should be looking at.

web_manifest:
I tried this and didn't get it to work, but feel I need to try again.

xbl\xml_dtd\xslt:
I tried various methods of including XML documents with DTD or XSLT. If it's inline, there doesn't seem to be a request for things like the DTD. If it's in a frame, it appears as a subdocument as you say. I also tried messing around with different SVG definitions.

comment:3 Changed 7 weeks ago by sebastian

  • Cc arthur added

Arthur, do you have any example of the $other filter option matching anything in the wild?

Note: See TracTickets for help on using tickets.