check if search exist and is correct in recovery key

This commit is contained in:
philc 2024-12-24 12:19:41 +01:00
parent 04efb9f00c
commit 7b0058e7a5

View File

@ -58,12 +58,28 @@ Pagans.keyrecovery = (emailalias, tribe, search, lg) => {
search, search,
lg lg
); );
if (!search || search.length<3) {
console.log(
currentmod,
"issue with search : emailalias, tribe, search, lg:",
emailalias,
tribe,
search,
lg
);
return {
status: 406,
ref: "Pagans",
msg: "nosearchstring",
data: {emailalias,tribe,search,lg},
};
}
if (!["email", "alias"].includes(emailalias)) { if (!["email", "alias"].includes(emailalias)) {
return { return {
status: 406, status: 406,
ref: "Pagans", ref: "Pagans",
msg: "emailaliasnotemailoralias", msg: "emailaliasnotemailoralias",
data: {}, data: {emailalias,tribe,search,lg},
}; };
} }
let emaillist = []; let emaillist = [];