implemented sessionVerification

This commit is contained in:
maru21 2023-10-03 20:34:42 +02:00
parent 6d35d3d608
commit aae8d60ecd

View File

@ -70,7 +70,7 @@ function setPassword() {
document.getElementById("login").style.display = "none"; document.getElementById("login").style.display = "none";
window.sessionStorage.setItem(sha256("verified"), XORCipher.encode(sha256("passwordHash"), passwordHash)); window.sessionStorage.setItem(sha256("verified"), XORCipher.encode(sha256("passwordHash"), passwordHash));
setCookie(sha256("verified"), XORCipher.encode(sha256("passwordHash"), passwordHash.toString()), 10) setCookie(sha256("verified"), XORCipher.encode(sha256("passwordHash"), passwordHash), 10)
} }
} }
@ -107,11 +107,14 @@ export function sessionVerification() {
verfiedStatus = null; verfiedStatus = null;
} }
console.log(vsString);
console.log(pnString);
let tF = retrieveData("templateFiles"); let tF = retrieveData("templateFiles");
try { try {
tF = JSON.parse(tF); tF = JSON.parse(tF);
} catch(e) { } catch(e) {
verfiedStatus = null; //verfiedStatus = null;
} }
if (verfiedStatus == null) { if (verfiedStatus == null) {