mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-08-29 02:01:08 +00:00
fix: use crypto.randomBytes for secure pseudo-random value generation
This commit is contained in:
@@ -106,7 +106,7 @@ function createNTLMv2Response(type2message, username, ntlmhash, nonce, targetNam
|
||||
function createPseudoRandomValue(length) {
|
||||
var str = '';
|
||||
while (str.length < length) {
|
||||
str += Math.floor(Math.random() * 16).toString(16);
|
||||
str += Math.floor(crypto.randomBytes() * 16).toString(16);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user