Open Bug 1870879 Opened 10 months ago Updated 8 months ago

Mark of the Web zone identifier inconsistency with Chrome & Edge on blob: URIs

Categories

(Toolkit :: Downloads API, defect, P3)

Firefox 115
Desktop
Windows
defect

Tracking

()

Tracking Status
firefox-esr115 --- affected
firefox121 --- affected
firefox122 --- affected
firefox123 --- affected

People

(Reporter: abruening, Unassigned)

Details

Steps to reproduce:

Downloading a blob: file from an Intranet website that is marked as such on Windows with Firefox, Edge and Chrome.

Actual results:

Both Edge and Chrome do not apply a Mark of the Web zone identifier to the downloaded file, Firefox does.

Expected results:

Firefox should also not apply the Mark of the Web zone identifier to be consistent.

For testing: Add https://5509.github.io to Intranet or Trusted Sites in Windows' internet options and click the link on https://5509.github.io/demos/blob/ in the mentioned browsers.

Component: Untriaged → Downloads API
Product: Firefox → Toolkit

I can confirm that if I download the file from test page https://5509.github.io/demos/blob/ and test its zone identifier, it will be 3.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → FreeBSD
Hardware: Unspecified → Desktop

Does it work if you download a file directly from such a site (ie not a blob, but a "normal" http/https link)? E.g. using context menu + save link as on any normal link?

Flags: needinfo?(abruening)
OS: FreeBSD → Windows

(In reply to :Gijs (he/him) from comment #3)

Does it work if you download a file directly from such a site (ie not a blob, but a "normal" http/https link)? E.g. using context menu + save link as on any normal link?

Yes, it works as expected when it's a normal download. I've tried to look at the code that applies the mark and it seems like it doesn't handle blob: URIs, so it falls back to the default of applying the mark.

Thanks! So yes, looks like we need to add special handling in https://searchfox.org/mozilla-central/rev/14dc8f0e748d44778a02ffcf9ebcda3851b2bf9e/toolkit/components/downloads/DownloadIntegration.sys.mjs#518 to check for blob URIs and find their origin, then use that to ask Windows to map to a zone.

Severity: -- → S3
Flags: needinfo?(abruening)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.