[wpt-sync] Sync PR 64493 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=316512
Categories
(Core :: DOM: Security, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64493 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64493
Details from upstream follow.
Roberto Rodriguez <roberto_rodriguez2@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=316512
WebKit export from bug: about:<!---->blank inherits cross-<!---->origin policy container due to empty document URL
<pre>
about:blank inherits cross-origin policy container due to empty document URLDocuments created via javascript: URL have an empty internal URL. Document::setURL() would
normally normalize this to aboutBlankURL(), but the call is conditionally skipped during
document creation.When one of these documents creates a cross-origin iframe and then navigates it to about:blank,
the empty URL passes through NavigationRequester into NavigationAction::isEmpty(), which
mistakes it for an action that was never set. The fallback in FrameLoader::loadWithDocumentLoader
incorrectly rebuilds the action from the target frame's cross-origin document rather than the
original initiator (the javascript: URL document). The about:blank then inherits that document's
policy container instead of the initiator's, leaking its CSP and referrer via
SecurityPolicyViolationEvent.Fix by normalizing empty document URLs to aboutBlankURL() in NavigationRequester::from(),
matching what Document::setURL() and Document::urlForBindings() already do.WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=316512">https://bugs.webkit.org/show_bug.cgi?id=316512</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/319079@main">https://commits.webkit.org/319079@main</a>
</pre>
| Assignee | ||
Updated•7 days ago
|
| Assignee | ||
Comment 1•7 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=117962
| Assignee | ||
Comment 2•6 days ago
|
||
CI Results
Ran 8 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 27 tests and 4 subtests
Status Summary
Firefox
OK : 1[GitHub] 25[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-64-25h2-opt] 26[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug]
PASS: 1[GitHub] 70[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-64-25h2-opt] 76[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug]
FAIL: 6
Chrome
OK : 1
PASS: 1
Safari
OK : 1
PASS: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /content-security-policy/inheritance/iframe-all-local-schemes-inherit-self.sub.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-64-25h2-debug],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-windows11-64-25h2-opt] - /content-security-policy/inheritance/javascript-url-open-in-main-window.html [wpt.fyi]:
SKIP - /content-security-policy/inheritance/auxiliary-blank-document.html [wpt.fyi]
- For transient doc, violation event occurs in auxiliary, not opener window.:
FAIL
- For transient doc, violation event occurs in auxiliary, not opener window.:
- /content-security-policy/inheritance/document-write-iframe.html [wpt.fyi]
- document.open() keeps inherited CSPs on transient about:blank.:
FAIL
- document.open() keeps inherited CSPs on transient about:blank.:
- /content-security-policy/inheritance/frame-src-javascript-url.html [wpt.fyi]
- <iframe src='javascript:...'>'s inherits policy (dynamically inserted <iframe> is blocked):
FAIL
- <iframe src='javascript:...'>'s inherits policy (dynamically inserted <iframe> is blocked):
- /content-security-policy/inheritance/inheritance-from-initiator.sub.html?scheme=blob [wpt.fyi]
- blob: Changing contentWindow.location inherits from who changed it (apart from javascript:, which keeps target policies, and blob:, which always inherits from creator).:
FAIL - blob: window.open() inherits from caller (apart from javascript:, which keeps target policies, and blob:, which always inherits from creator).:
FAIL - blob: Click on anchor inherits from owner of the anchor (apart from javascript:, which keeps target policies, and blob:, which always inherits from creator).:
FAIL
- blob: Changing contentWindow.location inherits from who changed it (apart from javascript:, which keeps target policies, and blob:, which always inherits from creator).:
Tests Disabled in Gecko Infrastructure
- /content-security-policy/inheritance/iframe-all-local-schemes-inherit-self.sub.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-64-25h2-debug],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-windows11-64-25h2-opt] - /content-security-policy/inheritance/javascript-url-open-in-main-window.html [wpt.fyi]:
SKIP
Comment 4•4 days ago
|
||
| bugherder | ||
Comment 5•4 days ago
|
||
| bugherder | ||
Description
•