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

Unified Diff: third_party/WebKit/Source/core/workers/AbstractWorker.cpp

Issue 2551893002: Upgrade-Insecure-Requests: Split CSP checks into pre-upgrade and post-upgrade.
Patch Set: Created 4 years 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
Index: third_party/WebKit/Source/core/workers/AbstractWorker.cpp
diff --git a/third_party/WebKit/Source/core/workers/AbstractWorker.cpp b/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
index 5a0f70aa4434eb23b516c1d1df90ac5975eaac59..3c66c6359dd7d391239a466287201a2ff9cd278e 100644
--- a/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
+++ b/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
@@ -69,10 +69,17 @@ KURL AbstractWorker::resolveURL(const String& url,
if (getExecutionContext()->contentSecurityPolicy() &&
!(getExecutionContext()
->contentSecurityPolicy()
- ->allowRequestWithoutIntegrity(requestContext, scriptURL) &&
+ ->allowRequestWithoutIntegrity(
+ requestContext, scriptURL,
+ ResourceRequest::RedirectStatus::NoRedirect,
+ ContentSecurityPolicy::SendReport,
+ ContentSecurityPolicyHeaderTypeEnforce) &&
getExecutionContext()
->contentSecurityPolicy()
- ->allowWorkerContextFromSource(scriptURL))) {
+ ->allowWorkerContextFromSource(
+ scriptURL, ResourceRequest::RedirectStatus::NoRedirect,
+ ContentSecurityPolicy::SendReport,
+ ContentSecurityPolicyHeaderTypeEnforce))) {
exceptionState.throwSecurityError(
"Access to the script at '" + scriptURL.elidedString() +
"' is denied by the document's Content Security Policy.");

Powered by Google App Engine
This is Rietveld 408576698