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

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

Issue 2708873002: Stop CSP from matching independent scheme/port upgrades (Closed)
Patch Set: Refactoring port/scheme matching logic to have an easier time with auto-upgrading 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/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 0a81bf5eac573291ba8cb145ce3b09a3b6648331..7d5b8498b6ca998b23a1ce5743713b1518d9b913 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -61,7 +61,7 @@ bool SourceListDirective::allows(
if (m_allowStar) {
if (url.protocolIsInHTTPFamily() || url.protocolIs("ftp") ||
url.protocolIs("ws") || url.protocolIs("wss") ||
- m_policy->protocolMatchesSelf(url))
+ m_policy->protocolEqualsSelf(url.protocol()))
andypaicu 2017/02/24 08:41:00 We have modified protocolMatchesSelf to be protoco
return true;
return hasSourceMatchInList(url, redirectStatus);

Powered by Google App Engine
This is Rietveld 408576698