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

Unified Diff: extensions/common/manifest_handlers/csp_info.cc

Issue 1184353002: Explicitly whitelist 'blob:' and 'filesystem:' in extensions' default CSP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test. Created 5 years, 6 months 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 | « chrome/common/extensions/manifest_tests/extension_manifests_sandboxed_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/manifest_handlers/csp_info.cc
diff --git a/extensions/common/manifest_handlers/csp_info.cc b/extensions/common/manifest_handlers/csp_info.cc
index e75699525515fceeb88bf7a81e719c1468e96345..5581d510ac4defccdf635729d57b43141d024ac4 100644
--- a/extensions/common/manifest_handlers/csp_info.cc
+++ b/extensions/common/manifest_handlers/csp_info.cc
@@ -24,13 +24,15 @@ using csp_validator::SanitizeContentSecurityPolicy;
namespace {
const char kDefaultContentSecurityPolicy[] =
- "script-src 'self' chrome-extension-resource:; object-src 'self';";
+ "script-src 'self' blob: filesystem: chrome-extension-resource:; "
+ "object-src 'self' blob: filesystem:;";
#define PLATFORM_APP_LOCAL_CSP_SOURCES \
- "'self' data: chrome-extension-resource:"
+ "'self' blob: filesystem: data: chrome-extension-resource:"
+
const char kDefaultPlatformAppContentSecurityPolicy[] =
// Platform apps can only use local resources by default.
- "default-src 'self' chrome-extension-resource:;"
+ "default-src 'self' blob: filesystem: chrome-extension-resource:;"
// For remote resources, they can fetch them via XMLHttpRequest.
" connect-src *;"
// And serve them via data: or same-origin (blob:, filesystem:) URLs
« no previous file with comments | « chrome/common/extensions/manifest_tests/extension_manifests_sandboxed_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698