Skip to content

Commit 18adc95

Browse files
authored
fix: utilize entire alphabet for random string (hestiacp#2735)
* fix: utilize entire alphabet for random string * fix: add lowercase j to string generation chars
1 parent 365dab5 commit 18adc95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/js/init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ $(document).ready(function(){
625625
* @returns string
626626
*/
627627
function randomString2(length = 16) {
628-
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
628+
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
629629
var secure_rng = function (min, max) {
630630
if (min < 0 || min > 0xffff) {
631631
throw new Error(
@@ -675,4 +675,4 @@ function randomString2(length = 16) {
675675
throw new Error("tried a million times, something is wrong");
676676
}
677677
}
678-
};
678+
};

0 commit comments

Comments
 (0)