mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-11 08:04:17 -08:00
Update util.ts
This commit is contained in:
parent
13cf6891ac
commit
075535ba46
|
@ -127,7 +127,7 @@ export function genSecret(length = 64) {
|
|||
let secret = "";
|
||||
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
const charsLength = chars.length;
|
||||
for ( let i = 0; i < 64; i++ ) {
|
||||
for ( let i = 0; i < length; i++ ) {
|
||||
secret += chars.charAt(getCryptoRandomInt(0, charsLength));
|
||||
}
|
||||
return secret;
|
||||
|
|
Loading…
Reference in a new issue