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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 570563003: Implement CSP check for manifest fetching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « no previous file | Source/core/frame/csp/CSPDirectiveList.h » ('j') | Source/core/frame/csp/CSPDirectiveList.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 73149d0feafa4792027a8cfae678c90ff5413ecf..2436d8d86fb0904e0c23caa459eea4274610ee08 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -555,6 +555,12 @@ bool ResourceFetcher::canRequest(Resource::Type type, const ResourceRequest& res
return false;
}
+ // FIXME(mkwst): Make sure that CSP uses RequestContext instead of this terrible Resource::Type enum.
Mike West 2014/09/16 11:46:20 Nit: We don't generally do the (<nick>) thing in B
+ if (resourceRequest.requestContext() == WebURLRequest::RequestContextManifest) {
+ if (!shouldBypassMainWorldCSP && !csp->allowManifestFromSource(url, cspReporting))
+ return false;
+ }
+
// Last of all, check for mixed content. We do this last so that when
// folks block mixed content with a CSP policy, they don't get a warning.
// They'll still get a warning in the console about CSP blocking the load.
« no previous file with comments | « no previous file | Source/core/frame/csp/CSPDirectiveList.h » ('j') | Source/core/frame/csp/CSPDirectiveList.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698