[rel=preload] Propagate "nonce" attribute from <link preload> to loaders
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: mayhemer, Assigned: tschuster)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 2 obsolete files)
Reporter | ||
Comment 1•5 years ago
|
||
The current state for CSS is: for a speculative load (which is also a link preload), we don't set 'nonce' for the CSP initial check and hence we don't even start that load. This will rule out link preload. Adding the nonce handling is an optimization. The current state doesn't impose any security issue.
The current state for script: we also add nonce
only for non-speculative loads.
This bug turns to be an optimization only, but as rel=preload is, as a whole, a performance feature, this should be done as part of M3.
Updated•2 years ago
|
Assignee | ||
Comment 2•1 year ago
|
||
By not supporting the nonce
attribute for speculative <script>
loads we would actually trigger CSP error reports in some cases, but bug 1505412 added a very targeted work around for that case. I don't want to replicate this workaround in bug 1313937 when more closely following the specification.
Currently I my patch exclusively supports <script src=".." nonce="..">
, because it wasn't totally clear to me if the <link>
element really supports nonce
. Extending the patch however should be fairly straight forward.
Assignee | ||
Updated•1 year ago
|
Comment hidden (obsolete) |
Assignee | ||
Comment 4•1 year ago
|
||
Depends on D182777
Updated•1 year ago
|
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Assignee | ||
Comment 7•1 year ago
|
||
So seems like these unexpected changes in the C++ code do cause problems. Additionally I am going to move this to another bug, so we don't have to leave-open this one.
Comment hidden (obsolete) |
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Backed out changeset 24e6bd152417 (Bug 1627263) as requested because it landed with the wrong bug number
Backout: https://hg.mozilla.org/integration/autoland/rev/ce73b773910f16b44bcb33f19a119d0a5bc40665
Comment 11•1 year ago
|
||
Comment on attachment 9342346 [details]
Bug 1627263 - Add nonce attribute to HTML parser.
Revision D182777 was moved to bug 1842199. Setting attachment 9342346 [details] to obsolete.
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 12•1 year ago
|
||
Depends on D183965
Assignee | ||
Comment 13•1 year ago
|
||
Depends on D183966
Assignee | ||
Comment 14•1 year ago
|
||
Depends on D183967
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 15•1 year ago
|
||
Updated•1 year ago
|
Comment 16•1 year ago
|
||
Comment 18•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e68b7692d21a
https://hg.mozilla.org/mozilla-central/rev/90cf5ca642be
https://hg.mozilla.org/mozilla-central/rev/66db18e3f66d
https://hg.mozilla.org/mozilla-central/rev/4fe288b36d3a
Description
•