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

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

Issue 2550093005: Embedding-CSP: Fixing path matching (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/SourceListDirectiveTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()))
Mike West 2016/12/08 08:25:52 Can you add a test to `CSPSourceTest.cpp`?
return true;
String path = decodeURLEscapeSequences(urlPath);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/SourceListDirectiveTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698