[wpt-sync] Sync PR 27271 - CSP: Use parsed policies for initializing Workers/Worklets
Categories
(Core :: DOM: Security, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox87 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream][domsecurity-backlog])
Sync web-platform-tests PR 27271 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/27271
Details from upstream follow.
b'Antonio Sartori <antoniosartori@chromium.org>' wrote:
CSP: Use parsed policies for initializing Workers/Worklets
Workers/Worklet need to take into account Content Security Policies,
which are sometimes inherited by the creating document and sometimes
parsed from the HTTP headers directly. At the moment, we are storing
and sending around the raw CSP policies. For example, when a Worker
inherits the CSPs from the creating document, we send the raw strings,
which were just parsed in the document, to the Worker, where they are
parsed a second time.Not only this multiple parsing of the same policy is superfluous and
can be avoided. It can also create inconsistencies (see the failing WP
test content-security-policy/sandbox/meta-element.sub.html)This change replaces the raw policies with the parsed CSP types,
avoids multiple parsing, and fixes that test.Bug: 1021462,1149272
Change-Id: Ib431253419226d6642a086923620b3aba34feb43
Reviewed-on: https://chromium-review.googlesource.com/2636314
WPT-Export-Revision: 69e7578297f0fd3dc3a4a12aa6a4e219444a836d
| Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
CI Results
Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 1 subtests
Status Summary
Firefox
OK : 1
FAIL: 1
Chrome
OK : 1
FAIL: 1
Safari
OK : 1
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
/content-security-policy/script-src/worker-data-set-timeout.sub.html
Shared worker with data: url inherits CSP: FAIL (Chrome: FAIL, Safari: FAIL)
Updated•5 years ago
|
Comment 5•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a6dd9c703e83
https://hg.mozilla.org/mozilla-central/rev/6d87b739d428
Description
•