Skip to content

Commit 13f2b78

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

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,4 @@ Index: third-party-src/src/vs/workbench/contrib/notebook/browser/view/renderers/
4949
+ script-src ${webviewGenericCspSource} 'unsafe-inline' 'wasm-unsafe-eval';
5050
style-src ${webviewGenericCspSource} 'unsafe-inline';
5151
img-src ${webviewGenericCspSource} https: http: data:;
52-
font-src ${webviewGenericCspSource} https:;
53-
Index: third-party-src/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
54-
===================================================================
55-
--- third-party-src.orig/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
56-
+++ third-party-src/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
57-
@@ -4,7 +4,7 @@
58-
<meta http-equiv="Content-Security-Policy" content="
59-
default-src 'none';
60-
child-src 'self' data: blob:;
61-
- script-src 'self' 'unsafe-eval' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
62-
+ script-src 'self' 'wasm-unsafe-eval' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
63-
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
64-
</head>
65-
<body>
52+
font-src ${webviewGenericCspSource} https:;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ 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>
72-
<body>
72+
<body>

0 commit comments

Comments
 (0)