Chromium Code Reviews| 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); |