Skip to content

Commit c3f0279

Browse files
Fixing codeQL bugs :Updating hash algorithm (#3318)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
1 parent c66cab3 commit c3f0279

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/documentation/scripts/generateAttribution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const gravatarURLForAuthor = (email) => {
3939
return "https://avatars.githubusercontent.com/u/49038?s=100&u=0b9ac5bf42a8ea2543a05191e150e0213456744e&v=4";
4040

4141
default:
42-
return crypto.createHash("md5").update(email).digest("hex");
42+
return crypto.createHash("sha256").update(email).digest("hex");
4343
}
4444
};
4545

packages/playground-examples/scripts/generateTOC.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const getFilePaths = folderPath => {
2626
* @property {string} title - name
2727
* @property {string} lang - the language for the example
2828
* @property {number} sortIndex - when listing the objects
29-
* @property {string} hash - the md5 of the content
29+
* @property {string} hash - the sha512 of the content
3030
* @property {any} compilerSettings - name
3131
*/
3232

@@ -96,7 +96,7 @@ langs.forEach(lang => {
9696
.replace(/\+/g, "-"),
9797

9898
sortIndex: index,
99-
hash: crypto.createHash("md5").update(contents).digest("hex"),
99+
hash: crypto.createHash("sha512").update(contents).digest("hex"),
100100

101101
compilerSettings: compiler,
102102
};

0 commit comments

Comments
 (0)