Skip to content

Commit 46e1e7b

Browse files
committed
Fixing security issue
1 parent 9829236 commit 46e1e7b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
const crypto = require('crypto');
44

55
function getRandomString(text){
6-
const randomInt = crypto.randomBytes(4).readUInt32BE(0) % 100000 + 1;
6+
const randomInt = crypto.randomBytes(4).readUInt32BE(0);
77
return text + randomInt;
88
}
99

1010
function getRandomInt(){
11-
return crypto.randomBytes(4).readUInt32BE(0) % 100000 + 1;
11+
return crypto.randomBytes(4).readUInt32BE(0);
1212
}
1313

1414
function getRandomAmount(){

0 commit comments

Comments
 (0)