285 Commits
Author SHA1 Message Date
Linus Rath 391ed6c018 Merge branch 'fix/security-audit-2026-10' 2026-10-19 12:58:50 +02:00
Linus Rath 9f3441c783 fix: accept both fetch response types in the capped feed reader 2026-10-19 01:36:16 +02:00
Linus Rath 546f34f47e fix: cap concurrent upstream favicon fetches 2026-10-19 01:32:29 +02:00
Linus Rath d13aada077 fix: bound how many CalDAV probes one discovery request can make 2026-10-19 01:32:29 +02:00
Linus Rath 703a15663f fix: keep the extension directory URL off private addresses 2026-10-19 01:32:25 +02:00
Linus Rath 71036c1812 fix: validate the marketplace version and refuse a silent downgrade on update 2026-10-19 01:32:24 +02:00
Linus Rath 5632097971 fix: type the capped feed reader and the invitation sender lookup 2026-10-19 01:32:23 +02:00
Linus Rath 0b01a2d066 fix: ask before handing a sign-in to the mobile app and only to its own callback link 2026-10-19 01:22:19 +02:00
Linus Rath 044c98e6d2 fix: cap the size of a synced settings blob 2026-10-19 01:15:04 +02:00
Linus Rath c0b6519136 fix: stop reading a calendar feed at the size cap instead of buffering it whole 2026-10-19 01:15:04 +02:00
Linus Rath e6064f3476 fix: only connect and proxy plugin credentials that a plugin known to the server declares 2026-10-19 01:07:50 +02:00
Linus Rath 31326c7daf fix: keep OAuth client secrets and the session secret out of the admin audit log, config API and dashboard writes 2026-10-19 00:50:16 +02:00
Linus Rath f91b214719 fix: key synced settings on the account a token login resolves to, not on a bare claimed name 2026-10-19 00:45:11 +02:00
Linus Rath 89ef4d14f2 fix: budget failed sign-ins per client and forward the client address to the mail server 2026-10-19 00:43:00 +02:00
Linus Rath 8da659fd8c feat: install any version from the marketplace and show updates, withdrawn versions and advisories
The marketplace now talks to the extension directory's v2 API only. The
detail page lists every version, previews the one picked, installs it,
and refuses a version the publisher withdrew unless the admin confirms,
or one outside the Bulwark range it supports. The listing gains sort, an
Installed view and an updates strip fed by the directory's updates check,
with notices for advisories, deprecations and suspensions.

A self-hosted directory older than 2026-10-14 has no v2 API and no
longer works with the marketplace.
2026-10-19 00:09:39 +02:00
Linus Rath dd0da783c6 feat: keep replaced plugin and theme versions and roll back to them 2026-10-19 00:08:10 +02:00
Linus Rath 4adbad25f6 feat: end the provider session through a configured logout URL #1279 2026-10-18 13:46:48 +02:00
Linus Rath 8583c9efef feat: hide the version from the connector probe when the login page hides it #896 2026-10-17 19:18:21 +02:00
Linus Rath b611d9c028 feat: refresh sender icons that changed on the sender's website #960 2026-10-17 19:18:18 +02:00
Linus Rath deb106736e fix: load the admin panel when the config is read-only #1249 2026-10-17 19:17:48 +02:00
Linus Rath a854447346 fix: apply admin policy defaults to user settings #1248 2026-10-17 19:17:46 +02:00
Linus Rath 20b0c9b0b5 fix: refuse OAuth auto-setup before touching Stalwart when the config is read-only #1250 2026-10-16 22:35:07 +02:00
Linus Rath 0b49d01a76 fix: keep synced calendar subscriptions from stale devices and past deletions #1064 2026-10-15 23:54:37 +02:00
Linus Rath db2c0aff3d perf: load conversation sizes with the folder page instead of in a second request 2026-10-15 00:14:57 +02:00
Linus Rath e7bf3c6e42 test: add a benchmark-sized message corpus to the dev mock 2026-10-14 23:51:17 +02:00
Linus Rath 15edc5943b feat: check the extension directory's signature before installing from the marketplace 2026-10-14 21:36:50 +02:00
Linus Rath eba711bd54 Merge branch 'feat/plugin-system-audit' 2026-10-14 18:09:19 +02:00
Linus Rath 633df44090 fix: keep the sign-in response small enough for proxies with large OIDC tokens #1237 2026-10-14 13:59:41 +02:00
Linus Rath 607f1b2496 feat: let plugin notifications carry a link to the plugin's own server 2026-10-14 10:58:19 +02:00
Linus Rath c3cf0ddcff feat: tell plugins whether the admin has set up their accounts and keys 2026-10-14 08:24:28 +02:00
Linus Rath 49511dff38 feat: let plugins read their own non-secret admin settings without the admin permission 2026-10-14 06:23:10 +02:00
Linus Rath 5d9268c923 feat: let plugins add buttons, calendar day labels and pages, and use connected accounts from the sandbox 2026-10-14 04:31:43 +02:00
Linus Rath 022b83c005 feat: let plugins use accounts and API keys through the server without seeing them
Plugins that talk to Nextcloud, Paperless or an AI provider used to need
the password or key in their own settings, readable by the plugin and
stored in the browser. A plugin can now declare credentials in its
manifest and send requests "with credential X" through the server:

- `credentials` in the manifest: admin scope (secret and server from the
  admin config) or user scope (the user connects an account; the server
  address is fixed or chosen by the user)
- `/api/plugin-secrets`: the user's connected accounts, encrypted per
  mail account under `PLUGIN_SECRETS_DIR`; listing never returns secrets
- `/api/plugin-proxy`: adds the secret and forwards only to the
  credential's own origin, through the SSRF guard unless the admin set
  the server up or listed it in `PLUGIN_PROXY_PRIVATE_ORIGINS`; no
  redirects or WebDAV moves to other servers, streamed bodies capped at
  512 MB up and 2 GB down, 300 requests a minute per plugin, 8 at once
  per user, and one audit line per request without paths or bodies
- a capture mode that stores a secret from a sign-in response (Nextcloud
  Login Flow v2) and removes it from what the plugin gets back
2026-10-14 04:00:36 +02:00
Linus Rath 15cec58a46 fix: serve plugin bundles only to signed-in users 2026-10-14 02:27:35 +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 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 468c1aac0c fix: refuse marketplace bundles whose id differs from the directory entry 2026-10-14 01:32:44 +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
lucamzanon 9560a8b74f feat: optional encrypted backup of the account list
Users with several accounts can save the list of accounts in their browser
(address, server, label, colour) on the webmail server and bring it back on
another device. The list is encrypted in the browser with a password the user
chooses (PBKDF2-SHA-256, 600,000 iterations, AES-256-GCM, owner bound as
additional data); the server stores only the envelope, one file per owner
under SETTINGS_DATA_DIR/account-archives. No mailbox passwords are included.

Off by default behind the admin feature gate accountArchiveEnabled, pinned
off in Lite. Every method of /api/account-archive needs a session cookie of
the owner, matched without regard to case, whose credential is checked
against the mail server on each call; listing included.

Restored accounts this browser lacks are listed as awaiting sign-in: they
survive a reload, and opening one leads to the sign-in form with the address
filled in. Accounts already present get their archived label and colour.
2026-10-09 10:54:38 +02:00
Linus Rath a2e36e6e86 fix: open read-only documents in ONLYOFFICE without the -103 warning #1187 2026-10-08 14:32:39 +02:00
Linus Rath f87be32388 fix: keep an empty draft subject empty so send still warns #1189 2026-10-07 20:22:51 +02:00
Linus Rath 898e250a6a Merge pull request #1175 from cybersmurf/fix/calendar-agenda-shared-accounts
fix: show shared and group calendars in the Calendar Agenda
2026-10-06 23:28:54 +02:00
Linus Rath 9738231c2a fix: stop stale tabs and devices from dropping synced templates 2026-10-06 22:14:29 +02:00
sudandClaude Fable 5.1 61fc130a74 fix: show shared and group calendars in the Calendar Agenda
The agenda sidecar queried only the session's primary calendar account,
so events in a shared or group account (a family or team calendar) never
reached the Calendar Agenda plugin, although the calendar app shows them.

Read every account the calendar app reads: the primary account plus
accounts that advertise the calendar capability or are not personal,
mirroring the client's getCalendarCapableAccountIds(). Event and
calendar ids repeat across accounts, so the DTO id is scoped as
<accountId>:<id> and carries accountId; calendar colours are looked up
per account. A shared account whose calendars cannot be read is skipped
instead of failing the whole agenda; a failure of the primary account is
still reported.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 06:24:17 +02:00
Linus Rath 7e1a659c06 fix: open the WOPI editor behind a reverse proxy with split addresses #1130 2026-10-04 22:16:29 +02:00