bug ls in sendmail + log in pagans

This commit is contained in:
2024-02-20 07:27:45 +01:00
parent 4f1b99d494
commit ff93e84628
3 changed files with 15 additions and 12 deletions

View File

@@ -478,6 +478,7 @@ Odmdb.cud = (objectPathname, crud, itm, role, runindex = true) => {
data: { missingkey: getschema.data.schema.apxid },
};
}
if (log) console.log(currentmod,"Schema pass:",req.session.header);
fs.ensureDirSync(`${objectPathname}/itm/`);
fs.ensureDirSync(`${objectPathname}/idx/`);
const existid = fs.existsSync(

View File

@@ -36,7 +36,7 @@ Pagans.logout = (alias, tribe, xdays, xhash) => {
//max filename in ext4: 255 characters
tmpfs += `_${xhash.substring(150, 150 + tmpfs.length - 249)}.json`;
fs.remove(tmpfs);
console.log('logout token',tmpfs)
if (log) console.log(currentmod,'logout token',tmpfs)
return { status: 200, ref: "Pagans", msg: "logout" };
};
@@ -84,7 +84,7 @@ Pagans.getalias = (alias) => {
*/
Pagans.sendmailkey = (data) => {
console.log(
if (log) console.log(currentmod,
data.alias,
"-",
data.privatekey.substring(0,10),
@@ -95,7 +95,9 @@ Pagans.sendmailkey = (data) => {
"-",
data.publickey.substring(0,10),
"-",
data.email
data.email,
"-",
data.lg
);
const person = { alias:data.alias, privatekey:data.privatekey, tribe:data.tribe };
@@ -122,7 +124,7 @@ Pagans.sendmailkey = (data) => {
person.avecpassphrase=(person.passphrase!="")
console.log("person:", person);
const tplemail = require(`../../nationchains/tribes/adminapi/template/createidentity_${lg}.js`)
const tplemail = require(`../../nationchains/tribes/adminapi/template/createidentity_${data.lg}.js`)
person.message
const maildata = {
@@ -176,10 +178,10 @@ Pagans.authenticatedetachedSignature = async (
const { verified, keyID } = verificationResult.signatures[0];
try {
await verified; // throws on invalid signature
console.log("Signed by key id " + keyID.toHex());
if (log) console.log(currentmod,"Signed by key id " + keyID.toHex());
return KeyId.toHex().alias == alias;
} catch (e) {
console.log("Signature could not be verified: " + e.message);
if (log) console.log(currentmod,"Signature could not be verified: " + e.message);
return false;
}
};