Skip to content

Commit d41b9d7

Browse files
feiyangliu2023Feiyang Liu
andauthored
relax CSP policy to address vim extension installation problem (#142)
Co-authored-by: Feiyang Liu <lfeiyang@amazon.nl>
1 parent a72dee0 commit d41b9d7

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

patches/common/preapplied/remove-unsafe-headers.diff

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@ Index: third-party-src/src/vs/workbench/contrib/notebook/browser/view/renderers/
2424
style-src ${webviewGenericCspSource} 'unsafe-inline';
2525
img-src ${webviewGenericCspSource} https: http: data:;
2626
font-src ${webviewGenericCspSource} https:;
27-
Index: third-party-src/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
28-
===================================================================
29-
--- third-party-src.orig/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
30-
+++ third-party-src/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
31-
@@ -4,7 +4,7 @@
32-
<meta http-equiv="Content-Security-Policy" content="
33-
default-src 'none';
34-
child-src 'self' data: blob:;
35-
- script-src 'self' 'unsafe-eval' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
36-
+ script-src 'self' 'wasm-unsafe-eval' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
37-
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
38-
</head>
39-
<body>
4027
Index: third-party-src/src/vs/code/electron-browser/workbench/workbench-dev.html
4128
===================================================================
4229
--- third-party-src.orig/src/vs/code/electron-browser/workbench/workbench-dev.html
@@ -62,4 +49,4 @@ Index: third-party-src/src/vs/code/electron-browser/workbench/workbench.html
6249
+ 'wasm-unsafe-eval'
6350
blob:
6451
;
65-
style-src
52+
style-src

patches/web-embedded/remove-unsafe-eval-and-unsafe-inline-from-csp-direct.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Index: third-party-src/src/vs/workbench/services/extensions/worker/webWorkerExte
6565
<meta http-equiv="Content-Security-Policy" content="
6666
default-src 'none';
6767
child-src 'self' data: blob:;
68-
- script-src 'self' 'wasm-unsafe-eval' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
68+
- script-src 'self' 'unsafe-eval' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
6969
+ script-src 'self' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
7070
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
7171
</head>

0 commit comments

Comments
 (0)