Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 70534942aada5b6edcf5ac964c4237fee89ae082
https://github.com/WebKit/WebKit/commit/70534942aada5b6edcf5ac964c4237fee89ae082
Author: Roberto Rodriguez <roberto_rodrigu...@apple.com>
Date: 2026-03-19 (Thu, 19 Mar 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-blob-matches-blob.sub-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-blob-matches-blob.sub.html
A
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-self-does-not-match-blob.sub-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-self-does-not-match-blob.sub.html
M Source/WebCore/page/csp/ContentSecurityPolicy.cpp
M Source/WebCore/page/csp/ContentSecurityPolicy.h
M Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp
Log Message:
-----------
blob: URLs are allowed in <iframe>s when CSP’s `frame-src` contains `‘self’`.
https://bugs.webkit.org/show_bug.cgi?id=308752
rdar://171268629
Reviewed by Ryan Reno.
Remove the frame-src + blob: URL special case in urlMatchesSelf() that
extracts the blob: URL's creator origin and passes it through 'self'
matching. While §6.7.2.8 step 4.1 of the CSP spec
(https://w3c.github.io/webappsec-csp/#match-url-to-source-expression)
compares origins - for which a blob: URL is evaluated with creator's
origin - this is a known spec bug (github.com/w3c/webappsec-csp/issues/487).
Tests:
imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-blob-matches-blob.sub.html
imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-self-does-not-match-blob.sub.html
*
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-blob-matches-blob.sub-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-blob-matches-blob.sub.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-self-does-not-match-blob.sub-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/blob/frame-src-self-does-not-match-blob.sub.html:
Added.
* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::urlMatchesSelf const):
* Source/WebCore/page/csp/ContentSecurityPolicy.h:
* Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::matches const):
Canonical link: https://commits.webkit.org/309559@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications