Dependency advisories: nodemailer 10, overrides for Payload's pinned deps

- nodemailer ^8.0.1 -> ^10.2.1 (advisories up to 10.1.3); drop @types/nodemailer,
  nodemailer 10 ships its own types. Node engines >=20.9.0 (nodemailer 10 needs 20+).
- pnpm.overrides (repo only, not passed to projects) for packages in payload 3.90.2's
  tree: undici and dompurify are exact-pinned upstream; fast-uri, js-yaml,
  browserslist, source-map-js, fast-copy, baseline-browser-mapping raised to fixed
  minimums. pnpm audit --prod: 19 high / 35 moderate / 11 low -> 0.
- Tests: SMTP over a local SMTP socket with real nodemailer (panelSmtpAdapter,
  sendEmail, unreachable server status), Microsoft Graph and Graph->SMTP fallback
  via mailAdapter; real payloadTotp through ipalKit, plus a check that payload-2fa
  resolves the project's payload.
- Docs: email.md, AGENT.md §4 item 12, ipal-setup, ipal-upgrade, README.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-27 16:42:05 +01:00
co-authored by Claude Opus 5.5
parent 54fb57b7a9
commit 007a0a3ae6
9 changed files with 372 additions and 74 deletions
+9 -2
View File
@@ -10,8 +10,15 @@ and the editor picks the transport in the panel. A separate `sendEmail` helper (
## Dependency
`nodemailer` (`^8`) is already in the plugin's `dependencies` — the project does not need to
install it. Graph is plain `fetch`, no extra packages.
`nodemailer` (`^10.2.1`) is already in the plugin's `dependencies` — the project does not need to
install it (nodemailer 10 ships its own types, so `@types/nodemailer` is not needed either). Graph is plain
`fetch`, no extra packages.
- **Node.js 20 or later** — nodemailer 10 requires it (the Coolify images run Node 22).
- **Why `^10.2.1`:** every nodemailer up to 10.1.3 has open advisories (address parser ReDoS, recipient-domain
bypass, `raw`/`resolveContent` file access). Do not pin an older nodemailer in the project.
- **Since nodemailer 9**, attachments given as an `href`/`path` URL are fetched with TLS certificate validation.
A mail with an attachment from a host with a self-signed certificate now fails instead of sending.
## Config