Block remote images by default

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-10-10 21:53:12 +03:00
co-authored by Copilot
parent 5cd8d545e9
commit 2068e3f32b
15 changed files with 166 additions and 16 deletions
+3 -2
View File
@@ -17,7 +17,7 @@ The browser UI is rendered from the web assets in the root and `www/` folders:
- `index.html` and the shared shell files define the layout and global state.
- `app.js`, `mail-ui.js`, `account-ui.js`, `dav-ui.js`, `pgp-ui.js`, and `pgp-mail-ui.js` handle page flow, compose/read views, account setup, and encryption UX.
- The renderer is intentionally thin: it requests actions and displays data, but the actual cryptographic and network work stays in the main process.
- The renderer is intentionally thin: it requests actions and displays data, while mail-protocol and cryptographic network work stays in the main process. The reader makes direct HTTPS image requests only after explicit per-message approval.
### Android client
@@ -73,6 +73,7 @@ This boundary is important for encryption and safety checks:
- Key-server lookup results never elevate trust; only the public key is sent during a separately confirmed publication.
- Send-time downgrade checks happen in the main process rather than only in UI logic.
- External links open only after a native confirmation dialog.
- Incoming HTML is sanitized in the renderer before insertion. HTTPS image URLs are kept in inert data attributes; only a per-message user action assigns image sources, and reopening the message resets that approval. HTTP images are rejected to preserve Android's cleartext-traffic protection. The CSP allows HTTPS images; scripts, frames, forms, and remote connections remain blocked.
- Credentials and private keys are stored with the OS keyring, not in plain JSON files.
## 4. OpenPGP subsystem
@@ -91,7 +92,7 @@ Key-server enablement is persisted in encrypted OpenPGP settings; all servers de
## 5. Data flow patterns
- Account setup and edits flow from the UI into IPC, then into the encrypted main-process storage.
- Mail content is fetched by the main process and served to the renderer in a sanitized, parsed form.
- Mail content is fetched by the native mail service and passed to the renderer as plain text, bounded HTML alternatives, links, and attachment metadata. HTML is allowlist-sanitized before display; HTTPS image requests remain inert until explicitly enabled for the current message view.
- Attachments, decrypted bodies, and external links are all checked before user-visible actions are allowed.
- Search, folder listing, and draft operations reuse the same account model across both desktop and Android versions.