Closed Bug 1978315 Opened 12 days ago Closed 10 days ago

Stop using the type attribute of HTML anchors as a content type hint

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: tschuster, Assigned: tschuster)

References

(Blocks 1 open bug)

Details

(Keywords: sec-want)

Attachments

(2 files)

We seem to use type as in <a type="text/html href="...">..</a> as a Content-Type hint for the loading document. It seems like Chrome doesn't do this. This could possibly be used for some kind of attack, where we interpret something as e.g. HTML that would not sniff in other browsers. Additionally the HTML spec says the following:

The type attribute, if present, gives the MIME type of the linked resource. It is purely advisory. The value must be a valid MIME type string. User agents must not consider the type attribute authoritative — upon fetching the resource, user agents must not use metadata included in the link to the resource to determine its type.

https://html.spec.whatwg.org/multipage/links.html#attr-hyperlink-type

Pushed by tschuster@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/11aaf102b9e8 https://hg.mozilla.org/integration/autoland/rev/476b0361e52c Stop using the type attribute of HTML anchors as a content type hint. r=dom-core,edgar
Keywords: leave-open
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/53920 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Status: NEW → RESOLVED
Closed: 10 days ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: