Commit Graph
1029 Commits
Author SHA1 Message Date
Linus Rath af53675191 feat: add plain-data views of messages, events, contacts, tasks and files for plugin hooks 2026-10-14 03:16:25 +02:00
Linus Rath a3cb9e630e refactor: describe every plugin hook in one catalogue
The hook buses, the permission each hook needs and the docs were three
separate lists that had drifted: 145 of 198 hooks were never fired and
nothing noticed. `lib/plugin-hook-catalog.ts` now names each hook with
its kind, permission, payload and when it fires; the permission check
reads it, and a test fails for any catalogued hook without a call site.
Groups still being wired in this branch are listed in that test.

Also:
- new before-hooks for archive, spam, read state, star, keywords, folder
  changes, RSVP, event import, tasks, file moves, settings, identities,
  filters and out-of-office, plus onComposerClose and onSyncStateChange
- removed hooks that can never fire: the S/MIME group (S/MIME is a
  plugin now), onMobileViewSwitch, onSidebarAppChange and the
  registerShortcut pseudo-hook
- smime:read no longer grants anything; manifests that name it still
  install, with a warning
2026-10-14 03:14:29 +02:00
Linus Rath 480a1bb226 fix: clear a plugin's stored data when the admin removes it, not only on uninstall 2026-10-14 03:05:05 +02:00
Linus Rath 8ef7ec022f fix: deliver a plugin OAuth callback only to the plugin that started the flow 2026-10-14 03:04:17 +02:00
Linus Rath bf1d8fd2c3 fix: stop keeping unanswered plugin hook calls and old slot callbacks around 2026-10-14 03:02:12 +02:00
Linus Rath ada81d5f8f fix: hide the Next.js dev badge inside plugin slots and warn that dev sandboxes are not isolated 2026-10-14 03:01:13 +02:00
Linus Rath 3bfc0e69d0 fix: check attachments a plugin adds to the composer and keep callbacks out of shouldShow 2026-10-14 02:58:47 +02:00
Linus Rath 2adb1e2b12 fix: size toolbar plugin slots to their content and give composer plugin buttons their own row 2026-10-14 02:53:46 +02:00
Linus Rath cef2438c33 fix: let untrusted plugins upload attachments for the composer again 2026-10-14 02:34:31 +02:00
Linus Rath f048db7b52 fix: count each plugin hook failure once and keep a plugin that kept failing turned off 2026-10-14 02:33:45 +02:00
Linus Rath a491eab317 fix: hash WKD names with WebCrypto instead of shipping a Node crypto polyfill to the browser 2026-10-14 02:31:39 +02:00
Linus Rath 23c4c654d7 fix: limit what a plugin can store, download, toast and send to a WKD lookup, and report refused admin config writes 2026-10-14 02:30:54 +02:00
Linus Rath 22846b4a9b fix: keep blob uploads privileged-only and derive the WebAuthn salt from the calling plugin 2026-10-14 02:28:11 +02:00
Linus Rath c4853a4bba fix: check dev-directory plugins like uploads and keep their files inside the plugin folder 2026-10-14 02:26:56 +02:00
Linus Rath 9408daaf5e fix: keep an extension's admin state on re-upload and remove its config when it is deleted 2026-10-14 02:25:45 +02:00
Linus Rath bb562362b8 fix: lay out plugin slots right-to-left in Arabic, Hebrew and Persian and use the app font size 2026-10-14 02:24:45 +02:00
Linus Rath a21dbc92ec fix: switch running plugins to a new language right away and fall back from de-CH to de 2026-10-14 02:23:40 +02:00
Linus Rath 8f70951555 fix: give plugins their default settings and apply setting changes without a reload 2026-10-14 02:21:45 +02:00
Linus Rath eadff464a3 fix: keep plugin shortcuts behind ui:keyboard and off the keys the app and browser use 2026-10-14 02:19:10 +02:00
Linus Rath ff1d1f399d fix: limit plugin dialogs to one at a time, name the plugin in each and offer to turn it off 2026-10-14 02:15:45 +02:00
Linus Rath be3debdcb4 fix: never send a message when a plugin that checks it before sending fails or does not answer 2026-10-14 02:11:59 +02:00
Linus Rath 592db209db fix: sign plugin bundles when they are installed and require the signature for privileged plugins 2026-10-14 02:05:47 +02:00
Linus Rath e720be7e17 feat: let users install their own plugins, with admin review of the actual code
The admin page offered "User Plugin Uploads" and "Require Admin
Approval", but nothing in Settings used them: there was no upload, no
uninstall and no way to ask for approval, and the admin had no list of
requests. The approval code that existed pinned a hash of the code only
and showed the admin a manifest the browser sent, never the code.

Now:
- Settings > Plugins has an install button (when uploads are allowed),
  a remove button for the user's own plugins, and lists in plain
  language what each plugin may do, high-risk items first
- an install sends the ZIP to the server, which reads the manifest and
  code itself and pins the request to a hash of both
- the admin Plugins tab lists requests with the code and approves or
  denies them; a user may have 10 open requests
- a user plugin is checked again on every start, so a revoked approval
  or turning user plugins off takes effect
- the consent dialog and the plugin settings are translated, use the
  theme colours, and show the sites a plugin may send data to
2026-10-14 02:03:26 +02:00
Linus Rath e9f87c7970 fix: install Theme API v2 themes and their skins from the admin page and the marketplace 2026-10-14 01:47:58 +02:00
Linus Rath e57b7a2c18 fix: check plugin and theme packages the same way on every install path
The Settings upload, the admin upload, the marketplace install and the
marketplace preview each parsed the ZIP and manifest with their own copy
of the code, and the copies had drifted. A `permissions` string skipped
validation and was then matched by substring, a small ZIP could inflate
to hundreds of megabytes on the server, the Settings upload dropped
`locales` and took origin lists unchecked, and settings schemas were
never checked at all.

All of them now go through `lib/extension-package.ts`:
- every file is inflated through a byte cap, with a limit on entries
- one manifest check: types, permissions, entrypoint, version,
  minAppVersion, settingsSchema, configSchema, locales and origin lists
- only checked fields are stored
2026-10-14 01:43:43 +02:00
Linus Rath 0dd04ed21d fix: stop forcing a theme after the admin deletes or disables it 2026-10-14 01:34:40 +02:00
Linus Rath c45533646e fix: give slot plugins the message, event or contact only with the matching read permission 2026-10-14 01:31:30 +02:00
Linus Rath 9bff740a89 fix: keep plugin network access to the origins in its manifest 2026-10-14 01:27:02 +02:00
Linus Rath c9d2ba3d03 fix: stop offering ISO timestamps as verification codes #1236 2026-10-14 00:15:08 +02:00
mmmeon d35654cadb fix: set the sender's Message-ID on calendar invitations and replies 2026-10-13 16:32:25 +02:00
Linus Rath e0f60c0946 Merge branch 'main' of https://github.com/bulwarkmail/webmail 2026-10-13 15:58:52 +02:00
Linus Rath 8181f5ba0c feat: start new events on the calendar's default reminders #1209 2026-10-13 15:56:10 +02:00
Linus Rath 87c6b6762c feat: add helpers for calendar default alerts and email alert rows #1209 2026-10-13 15:56:09 +02:00
Linus Rath 3788446271 feat: let users hide shared mail accounts from the sidebar #1228 2026-10-13 15:55:54 +02:00
Linus Rath 693d9613c0 feat: let users turn off the prompt before deleting several messages #1225 2026-10-13 15:16:05 +02:00
Linus Rath 25cbbf8c10 fix: restore the full screen height when the iOS app resumes #1226 2026-10-13 14:53:23 +02:00
Linus Rath 4d733aa598 chore: remove unused exports and the dead plugin error boundary 2026-10-13 13:36:51 +02:00
Linus Rath 8ad072e458 feat: generate a session secret on first start when none is configured 2026-10-13 13:17:34 +02:00
Linus Rath 3da46b5a0d feat: remember every sign-in unless the admin shows the remember me box 2026-10-13 13:13:56 +02:00
Linus Rath 37440e02b0 fix: let tasks move into and live in calendars shared with you #1204 2026-10-12 07:36:46 +02:00
Linus Rath 19797b4c65 fix: sort the message list by date sent when that order is picked #1219 2026-10-12 07:22:00 +02:00
Linus Rath 1980de68c8 feat: give Mountain View's open message Gmail's toolbar, pager and header 2026-10-12 01:10:10 +02:00
Linus Rath 20b52a060f feat: draw Mountain View's message rows like Gmail's 2026-10-12 01:01:09 +02:00
Linus Rath 6e5e071078 fix: stop painting plain mails on a gray background in dark mode 2026-10-11 22:19:05 +02:00
Linus Rath 1ed7ec0327 Merge pull request #1213 from shukiv/fix/draft-body-from-body-parts
fix: take a re-opened draft's body from its body parts only
2026-10-11 21:03:18 +02:00
Shuki Vaknin 2a45f6099c fix: take a re-opened draft's body from its body parts only
A draft that carried attachments and no message re-opened with the
contents of one of the attachments as its text. Attach a .csv to an
empty draft, save it, re-open it: the editor shows the rows of the csv
as what you had written, and the next save or send makes that the real
message.

Both edit-draft paths built the text body by joining every value in
bodyValues:

    Object.values(draft.bodyValues).map(v => v.value).join('\n')

bodyValues is keyed by part id, and getEmail asks for
fetchAllBodyValues, which per RFC 8621 4.1.4 returns a value for every
text/* part of the message - attachments included. So any attached
.csv, .txt, .log or .md was joined in as body text, and with no html
body to prefer it became the whole message.

Take the body from the parts the server lists as the body instead, and
from nothing else. A draft whose textBody is empty now re-opens empty,
which is what an attachments-only draft is.

The selection lives in lib/email-body-selection.ts beside
getRenderableHtmlBody, which exists because the viewer and the mobile
thread view had already drifted apart once (#489). mail-app and the pro
email tab held character-for-character copies of this join, so the same
drift was already in place.
2026-10-11 18:04:26 +00:00
Linus Rath 54b74363e7 feat: offer one-click times in the Schedule send dialog 2026-10-11 20:03:42 +02:00
Linus Rath 46e4f8385c fix: mark quotes and list items in the plain-text part of sent mail 2026-10-11 20:00:47 +02:00
Linus Rath 2ae8c89990 fix: show the scheduled time rounded to the minute and with its date 2026-10-11 19:50:40 +02:00
Linus Rath 7aa35ca5b9 Merge branch 'main' of https://github.com/bulwarkmail/webmail 2026-10-11 19:42:32 +02:00