File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,14 @@ function update_csp() {
101101 echo " Calculated hash as $hash "
102102 # Use octothorpe as a delimiter since the hash may contain a slash.
103103 sed -i.bak " s#'sha256-[^']\+'#'sha256-$hash '#" " $file "
104+ # For the web worker extension host iframe, there is a matching sha in the
105+ # web server.
106+ if [[ $file == * /webWorkerExtensionHostIframe.html ]] ; then
107+ quilt add ./lib/vscode/src/vs/server/node/webClientServer.ts
108+ sed -i.bak \
109+ " s#webWorkerExtensionHostIframeScriptSHA = 'sha256-[^']\+'#webWorkerExtensionHostIframeScriptSHA = 'sha256-$hash '#" \
110+ ./lib/vscode/src/vs/server/node/webClientServer.ts
111+ fi
104112 done
105113
106114 quilt refresh
Original file line number Diff line number Diff line change @@ -24,3 +24,16 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWor
2424 connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
2525 </head>
2626 <body>
27+ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
28+ ===================================================================
29+ --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
30+ +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
31+ @@ -114,7 +114,7 @@ const APP_ROOT = dirname(FileAccess.asFi
32+ const STATIC_PATH = `/static`;
33+ const CALLBACK_PATH = `/callback`;
34+ const WEB_EXTENSION_PATH = `/web-extension-resource`;
35+ - const webWorkerExtensionHostIframeScriptSHA = 'sha256-daEgfo2VIXpx2Np71KqCCbkeQwv+68vPrx54XRcbdcs=';
36+ + const webWorkerExtensionHostIframeScriptSHA = 'sha256-gfjiOVjAlxqrivZAfTq2d83mOaz0fnAxbGaFpj5IjD8=';
37+
38+ /**
39+ * Substitutes the `{{...}}` placeholders of a workbench template. Placeholders must only ever
You can’t perform that action at this time.
0 commit comments