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

chore(vulnerability): Insecure randomness #11058

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const test_id = Math.floor(Math.random() * 100000);
const test_id = crypto.getRandomValues(new Uint32Array(1))[0];
const username = `Example Name ${test_id}`;
const email = `example${test_id}@example.com`;
const password = "Example password";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const number = Math.floor(Math.random() * 100000);
const number = crypto.getRandomValues(new Uint32Array(1))[0];
const accound_id = `account${number}`;
const warehouse_id = `warehouse${number}`;
const username = `user${number}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const number = Math.floor(Math.random() * 100000);
const number = crypto.getRandomValues(new Uint32Array(1))[0];
const accound_id = `account${number}`;
const warehouse_id = `warehouse${number}`;
const username = `user${number}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const test_id = Math.floor(Math.random() * 100000);
const test_id = crypto.getRandomValues(new Uint32Array(1))[0];
const username = `Example Name ${test_id}`;
const email = `example${test_id}@example.com`;
const password = "Example password";
Expand Down
Loading