Closed
Bug 838521
Opened 11 years ago
Closed 6 years ago
scripts with unsupported types are requested and downloaded (spec violation)
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
1.15 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0 Build ID: 20130116073211 Steps to reproduce: I referenced an unsupported type of script like this: <script type="application/nop" src="requesting-this-file-is-a-spec-violation.nop"></script> Test case: http://kaioa.com/k/test/script-test-case/index.html Actual results: Firefox 18 downloaded the referenced file even though it doesn't know what to do with it. (Firefox 18 did not execute the script. This part worked fine.) Expected results: Since Firefox does not know how to handle "application/nop" scripts, it must not download them. http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element The process should stop at step 7 (way before the download starts): "If the user agent does not support the scripting language given by the script block's type for this script element, then the user agent must abort these steps at this point. The script is not executed."
Updated•11 years ago
|
Component: Untriaged → HTML: Parser
Product: Firefox → Core
Updated•11 years ago
|
Assignee: nobody → hsivonen
Assignee | ||
Comment 1•6 years ago
|
||
Looks like Chrome (going back to at least version 37, which is the oldest I can get my hands on) and Safari do not download in this situation. I guess we might as well do the same.
Assignee: hsivonen → bzbarsky
Status: UNCONFIRMED → NEW
Component: HTML: Parser → DOM
Ever confirmed: true
Assignee | ||
Comment 2•6 years ago
|
||
I guess this only happens for script preloads, because ScriptLoader::ProcessScriptElement does bail out immediately on type mismatch.
Assignee | ||
Comment 3•6 years ago
|
||
MozReview-Commit-ID: JWiKNElENyZ
Attachment #8950950 -
Flags: review?(amarchesini)
Updated•6 years ago
|
Attachment #8950950 -
Flags: review?(amarchesini) → review+
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d60680f8627c Don't preload scripts of unknown type, just like we don't load them normally. r=baku
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d60680f8627c
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•