made shure that a password has been set

This commit is contained in:
maru21 2023-10-28 21:15:27 +02:00
parent 7dcc5815e3
commit b6fde65054
2 changed files with 6 additions and 3 deletions

View File

@ -22,9 +22,6 @@ export const passwordHash = {
this.set(XORCipher.decode(sha256(this.name), getCookie(sha256(this.name))));
}
}
if (passwordHash == "") {
return;
}
let verifiedStatus = false;
let tF = retrieveData("templateFiles");
if (tF != null) {verifiedStatus = true}

View File

@ -65,6 +65,9 @@ function createStorageObj() {
}
function storeData(name, data, ref) {
if (passwordHash == "") {
return;
}
data = JSON.stringify(data);
//setCookie(name, btoa(data), 7);
if (name == "userInput") {
@ -82,6 +85,9 @@ function storeData(name, data, ref) {
}
function retrieveData(name, template = "none") {
if (passwordHash == "") {
return null;
}
if (name == "userInput") {
let tF = retrieveData("templateFiles");
if (tF == null) {