mirror of
https://github.com/AuxXxilium/docker-ddns-server.git
synced 2024-11-23 23:00:59 +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() {
|
||||
let chars = "abcdefghijklmnopqrstuvwxyz!@#$%^&*()-+<>ABCDEFGHIJKLMNOP1234567890";
|
||||
let pass = "";
|
||||
for (let x = 0; x < 32; x++) {
|
||||
let i = Math.floor(Math.random() * chars.length);
|
||||
pass += chars.charAt(i);
|
||||
let chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
var passwordLength = 16;
|
||||
var password = "";
|
||||
for (var i = 0; i <= passwordLength; i++) {
|
||||
var randomNumber = Math.floor(Math.random() * chars.length);
|
||||
password += chars.substring(randomNumber, randomNumber +1);
|
||||
}
|
||||
return pass;
|
||||
|
||||
return password;
|
||||
}
|
||||
|
||||
$("button.generateHash").click(function () {
|
||||
|
Loading…
Reference in New Issue
Block a user