Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing codeQL bugs :Updating hash algorithm #3318

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/documentation/scripts/generateAttribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const gravatarURLForAuthor = (email) => {
return "https://avatars.githubusercontent.com/u/49038?s=100&u=0b9ac5bf42a8ea2543a05191e150e0213456744e&v=4";

default:
return crypto.createHash("md5").update(email).digest("hex");
jakebailey marked this conversation as resolved.
Show resolved Hide resolved
return crypto.createHash("sha512").update(email).digest("hex");
navya9singh marked this conversation as resolved.
Show resolved Hide resolved
}
};

Expand Down
4 changes: 2 additions & 2 deletions packages/playground-examples/scripts/generateTOC.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const getFilePaths = folderPath => {
* @property {string} title - name
* @property {string} lang - the language for the example
* @property {number} sortIndex - when listing the objects
* @property {string} hash - the md5 of the content
* @property {string} hash - the sha512 of the content
* @property {any} compilerSettings - name
*/

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

sortIndex: index,
hash: crypto.createHash("md5").update(contents).digest("hex"),
hash: crypto.createHash("sha512").update(contents).digest("hex"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking this, the website still works fine here. It's put into data-hash in ShowExamples and that's just used to cache loading them.


compilerSettings: compiler,
};
Expand Down