[wpt-sync] Sync PR 63453 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326655
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63453 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63453
Details from upstream follow.
Ahmad Saleem <ahmad.saleem792+github@gmail.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326655
WebKit export from bug: External scripts blocked by 'strict-dynamic' do not fire an error event
<pre>
External scripts blocked by 'strict-dynamic' do not fire an error eventThis patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
When a CSP policy contains 'strict-dynamic', WebKit checks external scripts
early via ContentSecurityPolicy::allowScriptForStrictDynamic(). If that check
failed, requestClassicScript() and requestModuleScript() returned without
firing an error event at the script element.Per "prepare the script element" [1], a script blocked by CSP is a network
error, so el's result is null and "execute the script element" says:"If el's result is null, then fire an event named error at el, and return."This is also what WebKit already does when CSP blocks a script without
'strict-dynamic', since the fetch is refused in the loader. For classic
scripts, fall through to the existing queued error event; for module
scripts, queue one on the DOM manipulation task source. Blocked inline
scripts are unchanged, as the spec returns without firing an error event
for those.WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=326655">https://bugs.webkit.org/show_bug.cgi?id=326655</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/323191@main">https://commits.webkit.org/323191@main</a>
</pre>
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=103301
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 91 tests and 6 subtests
Status Summary
Firefox
OK : 1[GitHub] 87[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 88[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-linux2404-64-debug, Gecko-linux2404-64-opt]
PASS : 2[GitHub] 181[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 184[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-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL : 29
TIMEOUT: 1[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-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt] 3[Gecko-windows11-64-25h2-debug]
ERROR : 1
Chrome
OK : 1
PASS : 2
Safari
TIMEOUT: 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /content-security-policy/script-src/script-src-1_4_1.html [wpt.fyi]:
OK[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-linux2404-64-debug,Gecko-linux2404-64-opt],SKIP[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /content-security-policy/script-src/scriptnonce-basic-blocked.sub.html [wpt.fyi]:
SKIP - /content-security-policy/script-src/script-src-strict_dynamic_modulepreload_parser_inserted_module.html [wpt.fyi]
- Parser-inserted external module script that is also
modulepreloaded is allowed withstrict-dynamic.:FAIL
- Parser-inserted external module script that is also
- /content-security-policy/script-src/tentative/script-url-allowed-by-hash.https.html [wpt.fyi]
- script-src should allow script by its url hash - header:
FAIL - A parseable url-hash should ignore hostname allowlists - header:
FAIL - default-src should allow script by its url hash - header:
FAIL - script-src-elem should allow script by its url hash - header:
FAIL - url hashes should allow dynamically inserted script if allowlisted - header:
FAIL - url hashes should allow redirected scripts - header:
FAIL - dynamically inserted parser-inserted script should be allowed if strict-dynamic-url is present - header:
FAIL - dynamically inserted script inserted by an inline script should be allowed if strict-dynamic-url is present - header:
FAIL - script-src should allow script by its relative url's hash - header:
FAIL - script-src should allow script by its relative url's hash in child directory - header:
FAIL - script-src should allow script by its relative url's hash in an iframe in child dir - header:
FAIL - script-src should allow script in parent dir by its relative url's hash in an iframe in child dir - header:
FAIL - script-src should allow script by its url hash - metatag:
FAIL - A parseable url-hash should ignore hostname allowlists - metatag:
FAIL - default-src should allow script by its url hash - metatag:
FAIL - script-src-elem should allow script by its url hash - metatag:
FAIL - url hashes should allow dynamically inserted script if allowlisted - metatag:
FAIL - url hashes should allow redirected scripts - metatag:
FAIL - dynamically inserted parser-inserted script should be allowed if strict-dynamic-url is present - metatag:
FAIL - dynamically inserted script inserted by an inline script should be allowed if strict-dynamic-url is present - metatag:
FAIL - script-src should allow script by its relative url's hash - metatag:
FAIL - script-src should allow script by its relative url's hash in child directory - metatag:
FAIL - script-src should allow script by its relative url's hash in an iframe in child dir - metatag:
FAIL - script-src should allow script in parent dir by its relative url's hash in an iframe in child dir - metatag:
FAIL
- script-src should allow script by its url hash - header:
- /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-dedicated-worker.https.html [wpt.fyi]
- script-specific violation report contains correct urlHash in dedicated worker:
FAIL
- script-specific violation report contains correct urlHash in dedicated worker:
- /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-service-worker.https.html [wpt.fyi]:
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-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-opt],TIMEOUT[Gecko-windows11-64-25h2-debug]- script-specific violation report contains correct urlHash in service worker:
TIMEOUT
- script-specific violation report contains correct urlHash in service worker:
- /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-shared-worker.https.html [wpt.fyi]
- script-specific violation report contains correct urlHash in shared worker:
FAIL
- script-specific violation report contains correct urlHash in shared worker:
- /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash.https.html [wpt.fyi]:
ERROR- script-specific violation report contains correct urlHash:
TIMEOUT
- script-specific violation report contains correct urlHash:
- /content-security-policy/script-src/tentative/url-hash-in-header-and-meta.https.html [wpt.fyi]
- more lax meta tag should still allow script:
FAIL - multiple meta tags should apply most strict policy - both lax:
FAIL
- more lax meta tag should still allow script:
Tests Disabled in Gecko Infrastructure
- /content-security-policy/script-src/script-src-1_4_1.html [wpt.fyi]:
OK[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-linux2404-64-debug,Gecko-linux2404-64-opt],SKIP[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /content-security-policy/script-src/scriptnonce-basic-blocked.sub.html [wpt.fyi]:
SKIP - /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-service-worker.https.html [wpt.fyi]:
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-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-opt],TIMEOUT[Gecko-windows11-64-25h2-debug]
Description
•