2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: deepak1556 <hop2deep@gmail.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:47:47 -0700
|
|
|
|
Subject: blink-worker-enable-csp-in-file-scheme.patch
|
|
|
|
|
2019-12-13 17:18:45 +00:00
|
|
|
This allows file:// URLs in workers to have a CSP.
|
2018-09-21 00:30:26 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
2021-03-04 17:27:05 +00:00
|
|
|
index 870beea1249e10e59ead3d2777292deb2e559eb2..b8ab71e8395edfaa8cd8e56bbfcc315466239f06 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
|
|
|
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
2020-11-14 00:16:56 +00:00
|
|
|
@@ -366,7 +366,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
|
2018-09-14 05:02:16 +00:00
|
|
|
// document (which is implemented in WorkerMessagingProxy, and
|
|
|
|
// m_contentSecurityPolicy should be left as nullptr to inherit the policy).
|
2019-01-16 18:07:52 +00:00
|
|
|
if (!response.CurrentRequestUrl().ProtocolIs("blob") &&
|
|
|
|
- !response.CurrentRequestUrl().ProtocolIs("file") &&
|
|
|
|
!response.CurrentRequestUrl().ProtocolIs("filesystem")) {
|
2019-04-20 17:20:37 +00:00
|
|
|
content_security_policy_ = MakeGarbageCollected<ContentSecurityPolicy>();
|
2021-03-04 17:27:05 +00:00
|
|
|
content_security_policy_->DidReceiveHeaders(
|