| Index: extensions/common/csp_validator.cc
|
| diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
|
| index e6c789f6f8e59fce0d2afdc732efac15d82a37f6..a2e8e896b8af2d48fd9da2ef8da6d832093f881d 100644
|
| --- a/extensions/common/csp_validator.cc
|
| +++ b/extensions/common/csp_validator.cc
|
| @@ -31,8 +31,7 @@ const char kObjectSrc[] = "object-src";
|
| const char kPluginTypes[] = "plugin-types";
|
|
|
| const char kObjectSrcDefaultDirective[] = "object-src 'self';";
|
| -const char kScriptSrcDefaultDirective[] =
|
| - "script-src 'self' chrome-extension-resource:;";
|
| +const char kScriptSrcDefaultDirective[] = "script-src 'self';";
|
|
|
| const char kSandboxDirectiveName[] = "sandbox";
|
| const char kAllowSameOriginToken[] = "allow-same-origin";
|
| @@ -176,13 +175,16 @@ void GetSecureDirectiveValues(const std::string& directive_name,
|
| std::string(extensions::kExtensionScheme) +
|
| url::kStandardSchemeSeparator,
|
| false) ||
|
| - IsHashSource(source_literal) ||
|
| - base::StartsWith(source_lower, "chrome-extension-resource:",
|
| - base::CompareCase::SENSITIVE)) {
|
| + IsHashSource(source_literal)) {
|
| is_secure_csp_token = true;
|
| } else if ((options & OPTIONS_ALLOW_UNSAFE_EVAL) &&
|
| source_lower == "'unsafe-eval'") {
|
| is_secure_csp_token = true;
|
| + } else if (base::StartsWith(source_lower, "chrome-extension-resource:",
|
| + base::CompareCase::SENSITIVE)) {
|
| + // The "chrome-extension-resource" scheme has been removed from the
|
| + // codebase, but it may still appear in existing CSPs. Silently ignore it.
|
| + continue;
|
| }
|
|
|
| if (is_secure_csp_token) {
|
|
|