Skip to content

Commit 387b4de

Browse files
committed
fix: update inline script nonces
1 parent a3dea91 commit 387b4de

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

patches/webview.diff

+10-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index
4949
===================================================================
5050
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
5151
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
52+
@@ -5,7 +5,7 @@
53+
<meta charset="UTF-8">
54+
55+
<meta http-equiv="Content-Security-Policy"
56+
- content="default-src 'none'; script-src 'sha256-xgIcbQmGjpT42GEj54VFSNh6MI15PZ2D1+DdVehfYBI=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
57+
+ content="default-src 'none'; script-src 'sha256-aOCIU83V9nV+0ERJudbrKLqgIVOHqU71i4Lv5urjGTI=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
58+
59+
<!-- Disable pinch zooming -->
60+
<meta name="viewport"
5261
@@ -331,6 +331,12 @@
5362

5463
const hostname = location.hostname;
@@ -88,7 +97,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWor
8897
default-src 'none';
8998
child-src 'self' data: blob:;
9099
- script-src 'self' 'unsafe-eval' 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' https:;
91-
+ script-src 'self' 'unsafe-eval' 'unsafe-inline' https:;
100+
+ script-src 'self' 'unsafe-eval' 'sha256-yHVIAbzODFRINjoLGID5qWPP45HzMtwhyVRC+7yiuXg=' https:;
92101
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
93102
</head>
94103
<body>

0 commit comments

Comments
 (0)