Security review and fix issues
This commit is contained in:
@@ -14,9 +14,9 @@ Related: [ENCRYPTION_PLAN.md](./ENCRYPTION_PLAN.md), [SECURITY_REVIEW.md](./SECU
|
||||
|
||||
Tracking legend: `[x]` implemented for the stated item; `[~]` partially implemented, with the remaining work stated beside it; `[ ]` not yet complete. A checked implementation item does **not** mean its phase's exit criteria or release gate have passed.
|
||||
|
||||
OpenPGP.js 6.3.2 is bundled for Android testing. The test implementation stores passphrase-protected keys and public contacts in the existing Keystore-encrypted vault; supports key generation/import/export, contact trust controls, PGP/MIME encrypt/sign, on-demand PGP/MIME or inline-encrypted-message decryption, and verification of signed-only PGP/MIME and clear-signed messages. Encrypted sends are converted to ciphertext before native sending or offline queueing; decrypted content is held in renderer memory only. Native prompts cover trust elevation, key replacement, and plaintext sending when keys exist or encryption was requested. Key-server lookup is disabled, and PGP/MIME messages are capped at 25 MiB. This work was implemented to enable testing before the independent review gate was satisfied; it is **not approved for sensitive or production use**.
|
||||
OpenPGP.js 6.3.2 is bundled for Android testing. The test implementation stores passphrase-protected keys and public contacts in the existing Keystore-encrypted vault; supports key generation/import/export, contact trust controls, PGP/MIME encrypt/sign, on-demand PGP/MIME or inline-encrypted-message decryption, and verification of signed-only PGP/MIME and clear-signed messages. Encrypted sends are converted to ciphertext before native sending or offline queueing; decrypted content is held in renderer memory only. Native prompts cover trust elevation, key replacement, and plaintext sends when keys exist or encryption was requested; every renderer-produced raw MIME send also requires a native confirmation because the native layer cannot cryptographically verify its encryption. Key-server lookup is disabled, and PGP/MIME messages are capped at 25 MiB. This work was implemented to enable testing before the independent review gate was satisfied; it is **not approved for sensitive or production use**.
|
||||
|
||||
**Validation evidence:** DAV URL, attachment-name, notification privacy, app-lock delay policy, app-owned Downloads selection, Android OpenPGP policy decisions, one-shot confirmation callbacks, bounded preview reads, and the missing-vault-key policy have Android unit tests. The latest run passed all 161 Node tests and all 25 Android unit tests; debug APK assembly and the release-manifest processing task also succeeded. The Android PGP module's Node-harness tests cover encrypted-message flows, passphrase-verified biometric unlock, invalidation error propagation, and manual passphrase recovery; they do not exercise Android Keystore prompts or OS-level invalidation. The app lock was previously exercised on an emulator with a device PIN, including background lock/unlock and screenshot obscuring; the new delay choices still need device lifecycle testing. OpenPGP key generation/storage and native trust/plaintext confirmation dialogs were previously exercised on an emulator; actual dialog automation remains open. The Android OpenPGP module also has automated GnuPG interoperability tests in a Node harness, but those are not device-level mail tests. The V0.5.11 worktree release-variant merged manifest was inspected; the hardened debug app loaded `https://localhost` and the Capacitor bridge in an emulator at a 411 px viewport. Device testing of vault-corruption/key-loss recovery, biometric enrollment invalidation, invalid-certificate integration, production-signed APK review, and automated instrumentation of native dialogs remain open. This does not constitute live-provider mail testing or GnuPG/Thunderbird interoperability testing on Android.
|
||||
**Validation evidence:** DAV URL, attachment-name, notification privacy, app-lock delay policy, app-owned Downloads selection, Android OpenPGP policy decisions, unverified-recipient confirmation, raw-MIME native warning policy, one-shot confirmation callbacks, bounded preview reads, and the missing-vault-key policy have Android unit tests. The latest run passed all 162 Node tests and all 26 Android unit tests; debug APK assembly and the release-manifest processing task also succeeded. The Android PGP module's Node-harness tests cover encrypted-message flows, passphrase-verified biometric unlock, invalidation error propagation, and manual passphrase recovery; they do not exercise Android Keystore prompts or OS-level invalidation. The app lock was previously exercised on an emulator with a device PIN, including background lock/unlock and screenshot obscuring; the new delay choices still need device lifecycle testing. OpenPGP key generation/storage and native trust/plaintext confirmation dialogs were previously exercised on an emulator; actual dialog automation remains open. The Android OpenPGP module also has automated GnuPG interoperability tests in a Node harness, but those are not device-level mail tests. The V0.5.11 worktree release-variant merged manifest was inspected; the hardened debug app loaded `https://localhost` and the Capacitor bridge in an emulator at a 411 px viewport. Device testing of vault-corruption/key-loss recovery, biometric enrollment invalidation, invalid-certificate integration, production-signed APK review, and automated instrumentation of native dialogs remain open. This does not constitute live-provider mail testing or GnuPG/Thunderbird interoperability testing on Android.
|
||||
|
||||
**Release blockers:** independent human cryptography/security review; instrumented tests of actual native confirmation/biometric dialogs and policy-bypass attempts; full signed/inline and hostile-input parity; Android/GnuPG/Thunderbird interoperability; Keystore lifecycle/recovery and biometric invalidation tests; invalid-certificate integration tests; production-signed APK/manifest review; app-lock process-recreation testing; and compatibility review/remediation of the three moderate `npm audit --omit=dev` advisories in `ip-address` and the `nodemailer`/`mailparser` dependency chain.
|
||||
|
||||
@@ -64,9 +64,9 @@ These are implementation observations, not proof that all paths are safe. In par
|
||||
- [~] OpenPGP.js 6.3.2 is pinned and used by the experimental Android bundle, before the independent review gate is complete solely to enable local testing. Automated Node-harness tests exercise the Android module against GnuPG; independent review and on-device GnuPG/Thunderbird interoperability remain release blockers.
|
||||
- [~] PGP keys, contacts, trust, and settings are stored in the existing Keystore-encrypted vault; keys generated/imported by the UI are passphrase-protected, and passphrases are not serialized in that store. Optional PGP passphrase release is separately encrypted by an authentication-bound Android Keystore key; biometric/device-credential invalidation clears the wrapper and falls back to the original passphrase. Device-level invalidation/recovery tests and automated at-rest checks remain open.
|
||||
- [x] Optional biometric/device-credential release of PGP key access is available per key; the default remains passphrase-only, and background sync does not use PGP private keys.
|
||||
- [~] The Android UI/bridge supports key generation, paste-based import, export, deletion, revocation export, contacts, fingerprints, trust, and public keys offered as message attachments (never imported silently). Native prompts guard trust elevation and replacement; automated cancel/confirm regression tests remain open.
|
||||
- [~] The Android UI/bridge supports key generation, paste-based import, export, deletion, revocation export, contacts, fingerprints, trust, and public keys offered as message attachments (never imported silently). Trust elevation and replacement are guarded; encryption to keys not fingerprint-verified now requires an explicit per-send confirmation showing the recipient and full fingerprint. Automated native cancel/confirm regression tests remain open.
|
||||
- [~] PGP/MIME encryption/signing, PGP/MIME and inline-encrypted-message decryption, attachments, encrypted Sent copies, ciphertext-before-queueing, signed-only PGP/MIME and clear-signed verification, and attached-public-key offers are implemented with Android-module tests. Tests cover Android-module/GnuPG interoperability in a Node harness, plus tampered, malformed, and oversized encrypted input. Device-level Thunderbird/GnuPG interoperability, native outbox/process-death tests, and remaining parity cases are open.
|
||||
- [~] Native prompts guard trust elevation, key replacement, and plaintext sending when a key is available or encryption was requested; the native send path checks PGP/MIME structure. Emulator smoke tests cover trust accept/cancel and plaintext cancel; policy and confirmation-gate unit tests cover prompt decisions and one-shot accept/cancel handling. Instrumented tests of the actual dialog UI, bypass attempts, stale-key cases, and queue policy remain open.
|
||||
- [~] Native prompts guard trust elevation, key replacement, and plaintext sending when a key is available or encryption was requested; every raw MIME send now requires native confirmation because the native layer cannot cryptographically verify renderer-produced encryption. The native send path also checks PGP/MIME structure. Emulator smoke tests cover trust accept/cancel and plaintext cancel; policy and confirmation-gate unit tests cover prompt decisions and one-shot accept/cancel handling. Instrumented tests of the actual dialog UI, bypass attempts, stale-key cases, and queue policy remain open.
|
||||
- [x] Key-server lookup and publication are disabled in the initial Android test implementation.
|
||||
|
||||
**Exit criteria:** parity tests for desktop message formats and trust rules; Android-specific tests for cancel/confirm paths, tampering, malformed/oversized messages, key replacement, offline queueing, process death, and passphrase expiry; independent human review before release.
|
||||
|
||||
@@ -76,6 +76,10 @@ internal object AndroidPgpPolicy {
|
||||
"The message body and attachments will be readable by the mail provider and anyone who receives it. Send plaintext anyway?"
|
||||
}
|
||||
|
||||
fun unverifiedRawMimeWarning(): String =
|
||||
"Android cannot verify that this raw MIME message is actually encrypted. It may contain readable message content, including inside a deceptive OpenPGP wrapper. " +
|
||||
"Signing alone does not encrypt a message. Continue only if you independently verified the MIME contents and intend to send them."
|
||||
|
||||
private fun safeLabel(values: List<String>): String =
|
||||
values.joinToString(", ").replace(Regex("[\\r\\n\\u0000]"), " ").take(300).ifBlank { "this contact" }
|
||||
|
||||
|
||||
@@ -638,10 +638,11 @@ class EpMailPlugin : Plugin() {
|
||||
sendPrepared(call, input)
|
||||
return
|
||||
}
|
||||
val rawMime = input.optString("rawBase64").isNotBlank()
|
||||
showPgpConfirmation(
|
||||
title = "Send without OpenPGP encryption?",
|
||||
title = if (rawMime) "Send unverified MIME?" else "Send without OpenPGP encryption?",
|
||||
message = warning,
|
||||
confirmLabel = "Send plaintext",
|
||||
confirmLabel = if (rawMime) "Send anyway" else "Send plaintext",
|
||||
onConfirmed = { sendPrepared(call, input) },
|
||||
onCancelled = {
|
||||
call.resolve(JSObject().put("failed", true).put("code", "PLAINTEXT_CANCELLED").put("message", "Plaintext send cancelled."))
|
||||
@@ -667,7 +668,7 @@ class EpMailPlugin : Plugin() {
|
||||
}
|
||||
|
||||
private fun plaintextSendWarning(input: JSONObject): String? {
|
||||
if (input.optString("rawBase64").isNotBlank()) return null
|
||||
if (input.optString("rawBase64").isNotBlank()) return AndroidPgpPolicy.unverifiedRawMimeWarning()
|
||||
val recipients = (listOf(input.optString("to"), input.optString("cc"))
|
||||
.filter(String::isNotBlank)
|
||||
.flatMap { InternetAddress.parse(it, true).mapNotNull { address -> (address as? InternetAddress)?.address?.lowercase(Locale.ROOT) } })
|
||||
|
||||
@@ -78,6 +78,15 @@ class AndroidPgpPolicyTest {
|
||||
assertFalse(warning.contains("Fingerprint:"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun rawMimeRequiresNativeConfirmationBecauseEncryptionCannotBeVerified() {
|
||||
val warning = AndroidPgpPolicy.unverifiedRawMimeWarning()
|
||||
|
||||
assertTrue(warning.contains("cannot verify"))
|
||||
assertTrue(warning.contains("deceptive OpenPGP wrapper"))
|
||||
assertTrue(warning.contains("Signing alone does not encrypt"))
|
||||
}
|
||||
|
||||
private fun contact(fingerprint: String, email: String, trust: String) =
|
||||
AndroidPgpPolicy.ContactKey(fingerprint, listOf(email), trust)
|
||||
}
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ep-mail",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ep-mail",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"dependencies": {
|
||||
"@capacitor/android": "^8.5.2",
|
||||
"@capacitor/core": "^8.5.2",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ep-mail",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"description": "Eternity Project mail client",
|
||||
"homepage": "https://git.eternityproject.fi/thuttu/ep-mail-client",
|
||||
|
||||
+1
-1
@@ -184,7 +184,7 @@ pgpMailUi.wrapShowCompose(baseShowCompose => function (reply, forward = false) {
|
||||
if (!selectPgpMailUi('#pgp-hint')) return;
|
||||
if (status.missing.length) hint.textContent = `No public key for ${status.missing.join(', ')}`;
|
||||
else {
|
||||
hint.textContent = status.recipients.some(item => item.trust === 'unknown') ? 'Keys found; some are not verified yet' : 'Keys found for all recipients';
|
||||
hint.textContent = status.recipients.some(item => item.trust !== 'verified') ? 'Keys found; some are not verified yet' : 'Keys found for all recipients';
|
||||
if (!touched && !encrypt.checked) encrypt.checked = true;
|
||||
}
|
||||
} catch { hint.textContent = ''; }
|
||||
|
||||
+16
-1
@@ -10113,7 +10113,7 @@ ${parts.join("")}`;
|
||||
}
|
||||
return results;
|
||||
}
|
||||
function createAndroidPgp({ EpMail: EpMail2, getAccount }) {
|
||||
function createAndroidPgp({ EpMail: EpMail2, getAccount, confirm = globalThis.confirm }) {
|
||||
let storePromise;
|
||||
const passphrases = /* @__PURE__ */ new Map();
|
||||
let cacheMinutes = 10;
|
||||
@@ -10287,6 +10287,21 @@ Add the new key as an unverified key? Compare fingerprints with the owner before
|
||||
if (pgp.encrypt && recipientKeys.missing.length) {
|
||||
throw Object.assign(new Error(`No public key for ${recipientKeys.missing.join(", ")}.`), { code: "NO_RECIPIENT_KEY", missing: recipientKeys.missing });
|
||||
}
|
||||
const unverifiedKeys = recipientKeys.keys.filter((item) => item.trust !== "verified");
|
||||
if (pgp.encrypt && unverifiedKeys.length) {
|
||||
const details = unverifiedKeys.map(
|
||||
(item) => `${item.address}
|
||||
${item.fingerprint.match(/.{1,4}/g).join(" ")} (${item.trust})`
|
||||
).join("\n\n");
|
||||
const warning = `These recipient keys have not been verified by fingerprint:
|
||||
|
||||
${details}
|
||||
|
||||
If a key is incorrect, its owner may be able to read this message. Compare each fingerprint with its owner through another channel before sending. Send encrypted mail to these unverified keys anyway?`;
|
||||
if (typeof confirm !== "function" || !confirm(warning)) {
|
||||
throw Object.assign(new Error("Sending to unverified recipient keys was cancelled."), { code: "UNVERIFIED_RECIPIENT_KEY" });
|
||||
}
|
||||
}
|
||||
let inner = mimeInner(`${String(message.text || "").slice(0, 5e5)}${account.signature ? `
|
||||
|
||||
${String(account.signature).slice(0, 5e3)}` : ""}`, message.attachments || []);
|
||||
|
||||
+11
-1
@@ -255,7 +255,7 @@ async function signatureStatuses(signatures, verification, sender) {
|
||||
return results;
|
||||
}
|
||||
|
||||
export function createAndroidPgp({ EpMail, getAccount }) {
|
||||
export function createAndroidPgp({ EpMail, getAccount, confirm = globalThis.confirm }) {
|
||||
let storePromise;
|
||||
const passphrases = new Map();
|
||||
let cacheMinutes = 10;
|
||||
@@ -373,6 +373,16 @@ export function createAndroidPgp({ EpMail, getAccount }) {
|
||||
if (pgp.encrypt && recipientKeys.missing.length) {
|
||||
throw Object.assign(new Error(`No public key for ${recipientKeys.missing.join(', ')}.`), { code: 'NO_RECIPIENT_KEY', missing: recipientKeys.missing });
|
||||
}
|
||||
const unverifiedKeys = recipientKeys.keys.filter(item => item.trust !== 'verified');
|
||||
if (pgp.encrypt && unverifiedKeys.length) {
|
||||
const details = unverifiedKeys.map(item =>
|
||||
`${item.address}\n${item.fingerprint.match(/.{1,4}/g).join(' ')} (${item.trust})`
|
||||
).join('\n\n');
|
||||
const warning = `These recipient keys have not been verified by fingerprint:\n\n${details}\n\nIf a key is incorrect, its owner may be able to read this message. Compare each fingerprint with its owner through another channel before sending. Send encrypted mail to these unverified keys anyway?`;
|
||||
if (typeof confirm !== 'function' || !confirm(warning)) {
|
||||
throw Object.assign(new Error('Sending to unverified recipient keys was cancelled.'), { code: 'UNVERIFIED_RECIPIENT_KEY' });
|
||||
}
|
||||
}
|
||||
let inner = mimeInner(`${String(message.text || '').slice(0, 500000)}${account.signature ? `\n\n${String(account.signature).slice(0, 5000)}` : ''}`, message.attachments || []);
|
||||
const headers = [
|
||||
`From: ${formatAddress(from)}`,
|
||||
|
||||
@@ -38,7 +38,7 @@ function makeEndpoint(account) {
|
||||
async pgpGetMessageSource() { return messageSource; }
|
||||
};
|
||||
return {
|
||||
api: createAndroidPgp({ EpMail, getAccount: async () => account }),
|
||||
api: createAndroidPgp({ EpMail, getAccount: async () => account, confirm: () => true }),
|
||||
setMessage(rawBase64) { messageSource = { rawBase64 }; }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ const bundled = esbuild.buildSync({
|
||||
vm.runInThisContext(bundled);
|
||||
const { createAndroidPgp } = global.AndroidPgpBundle;
|
||||
|
||||
function makeEndpoint(account) {
|
||||
function makeEndpoint(account, { confirm = () => true } = {}) {
|
||||
const vault = { keys: [], contacts: [], settings: {} };
|
||||
let messageSource = null;
|
||||
const EpMail = {
|
||||
@@ -29,7 +29,7 @@ function makeEndpoint(account) {
|
||||
async pgpGetMessageSource() { return messageSource; }
|
||||
};
|
||||
return {
|
||||
api: createAndroidPgp({ EpMail, getAccount: async () => account }),
|
||||
api: createAndroidPgp({ EpMail, getAccount: async () => account, confirm }),
|
||||
EpMail,
|
||||
setMessage(value) { messageSource = value; },
|
||||
vault
|
||||
@@ -85,6 +85,25 @@ test('Android OpenPGP refuses encryption when any recipient key is missing', asy
|
||||
}), error => error.code === 'NO_RECIPIENT_KEY');
|
||||
});
|
||||
|
||||
test('Android OpenPGP requires explicit fingerprint confirmation for unverified recipient keys', async () => {
|
||||
const sender = makeEndpoint({ email: 'alice@example.test', displayName: 'Alice', signature: '' }, {
|
||||
confirm: warning => {
|
||||
assert.match(warning, /bob@example\.test/);
|
||||
assert.match(warning, /[A-F0-9]{4}(?: [A-F0-9]{4}){9}/);
|
||||
assert.match(warning, /not been verified by fingerprint/);
|
||||
assert.match(warning, /Compare each fingerprint with its owner through another channel/);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
const recipient = makeEndpoint({ email: 'bob@example.test', displayName: 'Bob', signature: '' });
|
||||
const bob = await recipient.api.generate({ name: 'Bob', email: 'bob@example.test', passphrase: 'bob test passphrase' });
|
||||
await sender.api.addContact({ armoredKey: await recipient.api.exportPublic(bob.key.fingerprint) });
|
||||
await assert.rejects(sender.api.buildOutgoing({
|
||||
to: 'bob@example.test', text: 'do not send to an unverified key',
|
||||
pgp: { encrypt: true }, attachments: []
|
||||
}), error => error.code === 'UNVERIFIED_RECIPIENT_KEY');
|
||||
});
|
||||
|
||||
test('Android verifies PGP/MIME signed-only and clear-signed mail', async () => {
|
||||
const sender = makeEndpoint({ email: 'alice@example.test', displayName: 'Alice', signature: '' });
|
||||
const recipient = makeEndpoint({ email: 'bob@example.test', displayName: 'Bob', signature: '' });
|
||||
|
||||
@@ -150,6 +150,8 @@ test('Android OpenPGP uses the encrypted vault and queues only built MIME data',
|
||||
assert.match(plugin, /fun pgpGetMessageSource/);
|
||||
assert.match(plugin, /pgpStoreChangeWarning/);
|
||||
assert.match(plugin, /plaintextSendWarning/);
|
||||
assert.match(plugin, /AndroidPgpPolicy\.unverifiedRawMimeWarning\(\)/);
|
||||
assert.match(plugin, /title = if \(rawMime\) "Send unverified MIME\?"/);
|
||||
assert.match(plugin, /Send plaintext/);
|
||||
assert.match(plugin, /showPgpConfirmation\(/);
|
||||
assert.match(plugin, /onCancelled = \{ call\.reject\("OpenPGP key change cancelled\."\) \}/);
|
||||
@@ -158,7 +160,9 @@ test('Android OpenPGP uses the encrypted vault and queues only built MIME data',
|
||||
assert.match(androidPgpConfirmationGate, /compareAndSet\(false, true\)/);
|
||||
assert.match(androidPgpPolicy, /fun storeChangeWarning/);
|
||||
assert.match(androidPgpPolicy, /fun plaintextSendWarning/);
|
||||
assert.match(androidPgpPolicy, /fun unverifiedRawMimeWarning/);
|
||||
assert.match(androidPgp, /curve25519Legacy/);
|
||||
assert.match(androidPgp, /These recipient keys have not been verified by fingerprint/);
|
||||
assert.match(androidPgp, /multipart\/encrypted/);
|
||||
assert.match(androidPgp, /MAX_MESSAGE_BYTES = 25 \* 1024 \* 1024/);
|
||||
assert.match(androidPgp, /async function verifyMessage/);
|
||||
|
||||
+1
-1
@@ -184,7 +184,7 @@ pgpMailUi.wrapShowCompose(baseShowCompose => function (reply, forward = false) {
|
||||
if (!selectPgpMailUi('#pgp-hint')) return;
|
||||
if (status.missing.length) hint.textContent = `No public key for ${status.missing.join(', ')}`;
|
||||
else {
|
||||
hint.textContent = status.recipients.some(item => item.trust === 'unknown') ? 'Keys found; some are not verified yet' : 'Keys found for all recipients';
|
||||
hint.textContent = status.recipients.some(item => item.trust !== 'verified') ? 'Keys found; some are not verified yet' : 'Keys found for all recipients';
|
||||
if (!touched && !encrypt.checked) encrypt.checked = true;
|
||||
}
|
||||
} catch { hint.textContent = ''; }
|
||||
|
||||
+16
-1
@@ -10113,7 +10113,7 @@ ${parts.join("")}`;
|
||||
}
|
||||
return results;
|
||||
}
|
||||
function createAndroidPgp({ EpMail: EpMail2, getAccount }) {
|
||||
function createAndroidPgp({ EpMail: EpMail2, getAccount, confirm = globalThis.confirm }) {
|
||||
let storePromise;
|
||||
const passphrases = /* @__PURE__ */ new Map();
|
||||
let cacheMinutes = 10;
|
||||
@@ -10287,6 +10287,21 @@ Add the new key as an unverified key? Compare fingerprints with the owner before
|
||||
if (pgp.encrypt && recipientKeys.missing.length) {
|
||||
throw Object.assign(new Error(`No public key for ${recipientKeys.missing.join(", ")}.`), { code: "NO_RECIPIENT_KEY", missing: recipientKeys.missing });
|
||||
}
|
||||
const unverifiedKeys = recipientKeys.keys.filter((item) => item.trust !== "verified");
|
||||
if (pgp.encrypt && unverifiedKeys.length) {
|
||||
const details = unverifiedKeys.map(
|
||||
(item) => `${item.address}
|
||||
${item.fingerprint.match(/.{1,4}/g).join(" ")} (${item.trust})`
|
||||
).join("\n\n");
|
||||
const warning = `These recipient keys have not been verified by fingerprint:
|
||||
|
||||
${details}
|
||||
|
||||
If a key is incorrect, its owner may be able to read this message. Compare each fingerprint with its owner through another channel before sending. Send encrypted mail to these unverified keys anyway?`;
|
||||
if (typeof confirm !== "function" || !confirm(warning)) {
|
||||
throw Object.assign(new Error("Sending to unverified recipient keys was cancelled."), { code: "UNVERIFIED_RECIPIENT_KEY" });
|
||||
}
|
||||
}
|
||||
let inner = mimeInner(`${String(message.text || "").slice(0, 5e5)}${account.signature ? `
|
||||
|
||||
${String(account.signature).slice(0, 5e3)}` : ""}`, message.attachments || []);
|
||||
|
||||
Reference in New Issue
Block a user