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

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

Issue 2708873002: Stop CSP from matching independent scheme/port upgrades (Closed)
Patch Set: Created 3 years, 10 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/ContentSecurityPolicy.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 2064ac7cca644ec9f2d823727a2bcdeda21556fc..fb333f828aa9425914ea5fbd60fe2517fad9d9fa 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -1470,6 +1470,10 @@ bool ContentSecurityPolicy::protocolMatchesSelf(const KURL& url) const {
return equalIgnoringCase(url.protocol(), m_selfProtocol);
}
+bool ContentSecurityPolicy::protocolIsEqual(const String& protocol) const {
Mike West 2017/02/21 14:24:04 Is equal to what? It's not clear to me why I'd use
andypaicu 2017/02/21 15:51:44 We specifically don't want this function to match
+ return equalIgnoringCase(protocol, m_selfProtocol);
+}
+
bool ContentSecurityPolicy::selfMatchesInnerURL() const {
// Due to backwards-compatibility concerns, we allow 'self' to match blob and
// filesystem URLs if we're in a context that bypasses Content Security Policy

Powered by Google App Engine
This is Rietveld 408576698