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

Unified Diff: third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp

Issue 2714203002: Moved all tests about bypassing CSP into ContentSecurityPolicyTest (Closed)
Patch Set: Fixed build errors. Rebase-update. Created 3 years, 9 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: third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
index 588723028776f05d74da2efb810aa7094509ed28..03605790cc5c973bb052939b73e2d709362d0fd1 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -68,15 +68,10 @@ bool SourceListDirective::allows(
return hasSourceMatchInList(url, redirectStatus);
}
- KURL effectiveURL =
- m_policy->selfMatchesInnerURL() && SecurityOrigin::shouldUseInnerURL(url)
- ? SecurityOrigin::extractInnerURL(url)
- : url;
-
- if (m_allowSelf && m_policy->urlMatchesSelf(effectiveURL))
+ if (m_allowSelf && m_policy->urlMatchesSelf(url))
return true;
- return hasSourceMatchInList(effectiveURL, redirectStatus);
+ return hasSourceMatchInList(url, redirectStatus);
}
bool SourceListDirective::allowInline() const {

Powered by Google App Engine
This is Rietveld 408576698