(outdated) Firefox 72 allows for MIME sniffing on top-level documents when no Content Type is set#25371
Closed
(outdated) Firefox 72 allows for MIME sniffing on top-level documents when no Content Type is set#25371
Conversation
3 tasks
caugner
reviewed
Dec 11, 2024
| "version_added": "50" | ||
| "version_added": "50", | ||
| "impl_url": "https://bugzil.la/1591932", | ||
| "notes": "Since version 72, Content Type sniffing is enabled on top-level documents that have no `Content-Type`, even when `X-Content-Type-Options: nosniff` is set." |
Contributor
There was a problem hiding this comment.
In other words: Firefox ignores the X-Content-Type-Options header if the response has no Content-Type header?
Member
Author
There was a problem hiding this comment.
Yes, you should be setting a Content-Type if you're saying X-Content-Type-Options: nosniff.
Contributor
There was a problem hiding this comment.
Would this be accurate and easier to understand?
Suggested change
| "notes": "Since version 72, Content Type sniffing is enabled on top-level documents that have no `Content-Type`, even when `X-Content-Type-Options: nosniff` is set." | |
| "notes": "Firefox 72 and later ignores the header on top-level documents that have no `Content-Type` set." |
Member
Author
There was a problem hiding this comment.
Oh, after digging, this was reverted in Fx 75, https://bugzilla.mozilla.org/show_bug.cgi?id=1594766
So from 75 onwards, it's as follows:
/*
* If we did not get a useful Content-Type from the server
* but also have sniffing disabled, just determine whether
* to use text/plain or octetstream and log an error to the Console
*/
So X-Content-Type-Options: nosniff is respected.
I think we can close this as there's nothing really useful to add here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
edit: See #25371 (comment)
Summary
Adding impl_ulrs for some HTTP features. These were documented in MDN content prose, and removed in recent PRs.
Related issues
Follow-up from: