From f34018c3a30729bee418861c607dac827c35dd55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Fri, 18 Oct 2024 17:18:38 +0200 Subject: [PATCH 1/2] fix: allow data-urls connection in extension worker Some bundler may decide to transform small extension scripts or assets to base64 uris, and currently the CSP rules are blocking it --- ...w-data-urls-in-extension-host-worker.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 vscode-paches/0055-fix-allow-data-urls-in-extension-host-worker.patch diff --git a/vscode-paches/0055-fix-allow-data-urls-in-extension-host-worker.patch b/vscode-paches/0055-fix-allow-data-urls-in-extension-host-worker.patch new file mode 100644 index 00000000..7f270d7e --- /dev/null +++ b/vscode-paches/0055-fix-allow-data-urls-in-extension-host-worker.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= +Date: Thu, 17 Oct 2024 16:24:45 +0200 +Subject: [PATCH] fix: allow data urls in extension host worker + +--- + .../extensions/worker/webWorkerExtensionHostIframe.esm.html | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html b/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html +index 9a3c7cec21d..85505f08114 100644 +--- a/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html ++++ b/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html +@@ -5,7 +5,7 @@ + default-src 'none'; + child-src 'self' data: blob:; + script-src 'self' 'unsafe-eval' 'sha256-fCnZ3iXydTZHO961jO3ioYDdWSfm8PZg/rI6zFX/SE0=' https: http://localhost:* blob:; +- connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/> ++ connect-src 'self' data: https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/> + + +