Android security implementation Phase 3.1

This commit is contained in:
2026-11-03 18:05:14 +02:00
parent d165fdc4b4
commit e3b3a9bb52
14 changed files with 224 additions and 48 deletions
+9 -3
View File
@@ -9974,11 +9974,11 @@ ${parts.join("")}`;
storePromise = null;
throw error;
});
return storePromise;
return storePromise.then((value) => JSON.parse(JSON.stringify(value)));
}
async function persist(value) {
await EpMail2.pgpSaveStore({ store: value });
storePromise = value;
storePromise = Promise.resolve(JSON.parse(JSON.stringify(value)));
}
function cache(fingerprint, passphrase) {
if (!cacheMinutes) {
@@ -10488,7 +10488,13 @@ Only continue if you checked this fingerprint with the owner.`)) throw new Error
saveAttachment: (details) => EpMail.saveAttachment(details),
openExternal: (url) => EpMail.openExternal({ url }),
send: async (message) => {
if (!message?.pgp || !message.pgp.encrypt && !message.pgp.sign) return EpMail.send(message);
if (!message?.pgp || !message.pgp.encrypt && !message.pgp.sign) {
if (message?.pgp?.plaintextFallback) {
const { pgp: _options, ...plainMessage } = message;
return EpMail.send({ ...plainMessage, pgpRequested: true });
}
return EpMail.send(message);
}
try {
const { rawBase64, to: to2, from } = await daybreakMail.pgp.buildOutgoing(message);
const { pgp: _options, text: _text, attachments: _attachments, ...headers } = message;