summaryrefslogtreecommitdiffstats
path: root/extensions/common/csp_validator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/common/csp_validator.cc')
-rw-r--r--extensions/common/csp_validator.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
index 0ee0116..94f880e 100644
--- a/extensions/common/csp_validator.cc
+++ b/extensions/common/csp_validator.cc
@@ -9,6 +9,8 @@
#include "base/strings/string_split.h"
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
+#include "content/public/common/url_constants.h"
+#include "extensions/common/constants.h"
namespace extensions {
@@ -71,7 +73,10 @@ bool HasOnlySecureTokens(base::StringTokenizer& tokenizer,
StartsWithASCII(source, "http://localhost:", false) ||
StartsWithASCII(source, "https://", true) ||
StartsWithASCII(source, "chrome://", true) ||
- StartsWithASCII(source, "chrome-extension://", true) ||
+ StartsWithASCII(source,
+ std::string(extensions::kExtensionScheme) +
+ content::kStandardSchemeSeparator,
+ true) ||
StartsWithASCII(source, "chrome-extension-resource:", true)) {
continue;
}