Open Bug 1276918 Opened 10 years ago Updated 1 year ago

Drop support for navigating to responses whose MIME type is multipart/x-mixed-replace

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: annevk, Assigned: freddy)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open, Whiteboard: btpp-backlog)

Attachments

(1 external file, 1 obsolete file)

It's not supported in Edge, support in Safari seems half-baked, and it has been removed in Chrome long ago: https://bugs.chromium.org/p/chromium/issues/detail?id=249132. https://hixie.ch/tests/evil/page-loading/multipart/001.cgi can be used to test, e.g., with http://damowmow.com/playground/demos/multipart/001.html http://damowmow.com/playground/demos/multipart/002.html as URLs in the textarea. I also plan on removing this from the HTML Standard since it seems unlikely Chrome and Edge will ever pick this up again.
This is going to break websites, afaik, because right now some sites (e.g. Bugzilla!) UA-sniff and deliver mixed-replace content to Gecko... This feature was also used on at least some government websites in the US last I checked, and removing it would make it impossible to access those sites in Firefox. That was 5-6 years ago, though, so maybe they stopped using it since then. As far as Edge goes.... does IE support this? Because if so, I expect they're just telling people who need to use said government websites to use IE or Firefox right now.
IE8 and IE11 break in the same way as Edge does (rendering the whole response as HTML, including the boundaries and such). Doesn't look like they ever supported this.
https://github.com/whatwg/html/pull/1353 is the proposed change to the HTML Standard by the way.
Looks like the spec change is awaiting some work.
Whiteboard: btpp-backlog
Can we have telemetry for this in a way that checks the URL to exclude ones that look like Bugzilla query.cgi to get an idea of how big the problem is outside bugzilla installations (which one would hope to undergo some security patch maintenance)?
Severity: normal → S3
See Also: → 1864434

This will be fun.

Assignee: nobody → fbraun

Ideally, I would like to remove this for all types except images, but there
is some uncertainty wrt to other media load types and making small steps is
easier than huge strides. Especially when it's risking compatibility.

Keywords: leave-open
Attachment #9365918 - Attachment description: WIP: Bug 1276918 - restrict multipart/x-mixed-replace to non-document loads r=kershaw → Bug 1276918 - restrict multipart/x-mixed-replace to non-document loads r=kershaw
Pushed by fbraun@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68ae10a38cdf restrict multipart/x-mixed-replace to non-document loads r=necko-reviewers,valentin,kershaw

Release Note Request (optional, but appreciated)
[Why is this notable]: We're limiting support for the obscure HTTP Content-Type of multipart/x-mixed-replace due to some security concerns. Other browsers only support this for images, so this should mostly be fine. However, breakage at the HTTP level might be subtle and elevating this to release notes may help people troubleshoot and report back more easily.
[Affects Firefox for Android]: Same. Also removed.
[Suggested wording]: Firefox limits support for the HTTP Content-Type multipart/x-mixed-replace to align with other browsers. Users or enterprises that require ongoing support may change the network.multipart-mixed-replace.enabled_for_document pref to true.
[Links (documentation, blog post, etc)]:

Release Note Request in comment 9 above.

relnote-firefox: --- → ?

Backed out for causing reftest failures on webcam-simulacrum.mjpg

Backout link

Push with failures

Failure log // TV failure log

Flags: needinfo?(fbraun)

Ah, a failing reftest. And for some reasons docshell/test/mochitest/test_bug1747033.html fails in test-verification mode. Fixed the former, gotta further investigate the latter. Thanks for backing out!

Flags: needinfo?(fbraun)
Status: NEW → ASSIGNED
Regressions: 1868598

OK, the change turns test_bug1747033.html into a failure, but only in test-verification mode.
This is interesting because I'm only adding a pref with pushPrefEnv which should be disabled after the test. Effectively disabled/enabled back and forth for every test restart. Not sure what's going on here.

Often tests will already be failing with TV mode and any change (whitespace) will make them fail in TV (because you need to make some change for them to get run by TV).

No longer regressions: 1868598

I suppose the patch here may not be able to land as written. We will still need to support x-mixed-replace on top-level navigations to ImageDocuments. The ContentPolicyType is not a great deciding factor to use.

I suppose we may have to handle x-mixed-replace somehow in Document / ImageDocument loading instead?

Perhaps interpret all mixed replace as images? If it's not an image it'll just display an error suggesting it's an invalid image. Not great failure mode though.

Not sure I can finish this, unfortunately.

Assignee: fbraun → nobody
Status: ASSIGNED → NEW

Please re-nominate this when it's ready to land.

relnote-firefox: ? → ---
Attachment #9365918 - Attachment is obsolete: true
See Also: → 87537

Thanks tnikkel! It looks like my attempt to force rendering into ImageDocument like you suggested is looking better on try at https://treeherder.mozilla.org/jobs?repo=try&selectedTaskRun=TLiKbuHiT0-O29xALNgg7w.0&revision=debcb89b2fd4ccbac23055a661ef2818136087a8.

I don't have a lot of time to pursue this, so if that fails I'm not sure I can continue with this...

Assignee: nobody → fbraun
Status: NEW → ASSIGNED
Attachment #9427022 - Attachment description: WIP: Bug 1276918 - force mixed-replace into imagedocument → Bug 1276918 - force mixed-replace into imagedocument r=emilio
Attachment #9427022 - Attachment is obsolete: true

Looks like bugzilla relies on multipart-replace and other browsers still support this terrible ugly wart.
Too bad!

https://bugzilla.mozilla.org/show_bug.cgi?id=1903210

Assignee: fbraun → nobody
Status: ASSIGNED → NEW

The leave-open keyword is there and there is no activity for 6 months.
:hsinyi, maybe it's time to close this bug?
For more information, please visit BugBot documentation.

Flags: needinfo?(htsai)
Assignee: nobody → fbraun
Attachment #9427022 - Attachment is obsolete: false
Status: NEW → ASSIGNED

I want to give this another try.

Flags: needinfo?(htsai)

The standard still describes multipart document loads. But Chrome restricted this to images only, like here.
I think that's something we ought to track as well.

I'll open a bug for the HTML spec once I am confident that this here works.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: