mirror of
https://github.com/AuxXxilium/docker-ddns-server.git
synced 2024-12-04 02:16:50 +07:00
removed special characters in random password function as some characters causing issues in urls
This commit is contained in:
parent
561a800a1a
commit
7e415a710f
@ -142,13 +142,15 @@ $("button.copyUrlToClipboard").click(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function randomHash() {
|
function randomHash() {
|
||||||
let chars = "abcdefghijklmnopqrstuvwxyz!@#$%^&*()-+<>ABCDEFGHIJKLMNOP1234567890";
|
let chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
let pass = "";
|
var passwordLength = 16;
|
||||||
for (let x = 0; x < 32; x++) {
|
var password = "";
|
||||||
let i = Math.floor(Math.random() * chars.length);
|
for (var i = 0; i <= passwordLength; i++) {
|
||||||
pass += chars.charAt(i);
|
var randomNumber = Math.floor(Math.random() * chars.length);
|
||||||
|
password += chars.substring(randomNumber, randomNumber +1);
|
||||||
}
|
}
|
||||||
return pass;
|
|
||||||
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("button.generateHash").click(function () {
|
$("button.generateHash").click(function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user