From ff81fbfd9a3b9db2642e63c73c3f42afa9a63e5e Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Wed, 26 Oct 2022 08:36:17 +0200 Subject: [PATCH] Don't use md4 in crypto.createHash (#843) Fixes #842 Please review carefully - I don't fully understand how this hash is used and whether there are any implications of changing it. --- site/src/lib/fetchAllContributors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/lib/fetchAllContributors.ts b/site/src/lib/fetchAllContributors.ts index 9b463d315..49d72ae50 100644 --- a/site/src/lib/fetchAllContributors.ts +++ b/site/src/lib/fetchAllContributors.ts @@ -11,7 +11,7 @@ const IGNORE_COMMIT_MESSAGES = ['fork', 'optimize']; function getContentHashOfFile(path) { return new Promise((resolve, reject) => { - const hash = crypto.createHash('md4'); + const hash = crypto.createHash('sha256'); const stream = fs.createReadStream(path); stream.on('error', err => reject(err)); stream.on('data', chunk => hash.update(chunk));