From 31312147ed578ab805e15005a8b1852cc328710f Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Tue, 18 Mar 2025 23:01:37 +0700 Subject: [PATCH] Potential fix for code scanning alert no. 98: Use of a broken or weak cryptographic algorithm (#8265) Signed-off-by: Andrey Sobolev Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- server/ws/src/rpc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ws/src/rpc.ts b/server/ws/src/rpc.ts index 48529c6f7b..ad7208764b 100644 --- a/server/ws/src/rpc.ts +++ b/server/ws/src/rpc.ts @@ -53,7 +53,7 @@ async function sendJson ( // Calculate ETag let body: any = JSON.stringify(result, rpcJSONReplacer) - const etag = createHash('sha1').update(body).digest('hex') + const etag = createHash('sha256').update(body).digest('hex') const headers: OutgoingHttpHeaders = { ...(extraHeaders ?? {}), 'Content-Type': 'application/json',