Skip to content

Commit

Permalink
chore(vulnerability): Insecure randomness (datahub-project#11058)
Browse files Browse the repository at this point in the history
Co-authored-by: david-leifker <[email protected]>
  • Loading branch information
pinakipb2 and david-leifker authored Sep 5, 2024
1 parent d795a53 commit a146ffa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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

0 comments on commit a146ffa

Please sign in to comment.