This commit is contained in:
Benjamin Toby 2024-07-13 12:23:53 +01:00
parent d9d0b5ccc8
commit 012d945bb9

View File

@ -76,13 +76,25 @@ async function sendEmailCode({
* *
* @description Check Encryption Keys * @description Check Encryption Keys
*/ */
if (!encryptionKey?.match(/./)) return false; if (!encryptionKey?.match(/./)) {
console.log("DSQL Error => No Encryption Key Found!");
return false;
}
if (!encryptionSalt?.match(/./)) return false; if (!encryptionSalt?.match(/./)) {
console.log("DSQL Error => No Encryption Salt Found!");
return false;
}
if (encryptionKey.length < 24) return false; if (encryptionKey.length < 24) {
console.log("DSQL Error => Encryption key less than 24 characters!");
return false;
}
if (encryptionSalt.length < 8) return false; if (encryptionSalt.length < 8) {
console.log("DSQL Error => Encryption Salt less than 8 characters!");
return false;
}
/** /**
* Initialize HTTP response variable * Initialize HTTP response variable
@ -214,6 +226,7 @@ async function sendEmailCode({
if (httpResponse?.success) { if (httpResponse?.success) {
return true; return true;
} else { } else {
console.log(httpResponse);
return false; return false;
} }
} }