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

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

Issue 2550093005: Embedding-CSP: Fixing path matching (Closed)
Patch Set: Adding test cases Created 4 years 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/CSPSource.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
index bbde1965e3c178aae9988bbe2c567b2fee718169..92899f7608ee4b27888da2ff7e7578628a09eb2e 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
@@ -74,7 +74,7 @@ bool CSPSource::hostMatches(const String& host) const {
}
bool CSPSource::pathMatches(const String& urlPath) const {
- if (m_path.isEmpty())
+ if (m_path.isEmpty() || (m_path == "/" && urlPath.isEmpty()))
return true;
String path = decodeURLEscapeSequences(urlPath);

Powered by Google App Engine
This is Rietveld 408576698