Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Unified Diff: Source/core/frame/csp/CSPSourceList.cpp

Issue 1178373004: 'blob:' URLs should not match 'self' in CSP source expression lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Exclude extensions. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/csp/CSPSourceList.cpp
diff --git a/Source/core/frame/csp/CSPSourceList.cpp b/Source/core/frame/csp/CSPSourceList.cpp
index 2879466ff3b4430054087d9fdf14ad832d684493..9caeb9340d6a66a0b0480e6b466375fd44838ca0 100644
--- a/Source/core/frame/csp/CSPSourceList.cpp
+++ b/Source/core/frame/csp/CSPSourceList.cpp
@@ -48,7 +48,7 @@ bool CSPSourceList::matches(const KURL& url, ContentSecurityPolicy::RedirectStat
if (m_allowStar)
return true;
- KURL effectiveURL = SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url;
+ KURL effectiveURL = m_policy->selfMatchesInnerURL() && SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url;
if (m_allowSelf && m_policy->urlMatchesSelf(effectiveURL))
return true;

Powered by Google App Engine
This is Rietveld 408576698