SMTP host/port/secure validating resolver — replace the || default on the email-send path
A || default fires only on ABSENCE, so a SET-but-wrong SMTP_HOST was honoured unvalidated - and that is the host nodemailer presents SMTP_USER/SMTP_PASS to, making it a credential-disclosure path rather than a delivery failure. SMTP_PORT failed differently: Number('nonsense') is NaN with no throw and the || never fires because the value is PRESENT. Shipped 88b67f6 v2.65.3: absent env keeps the documented default, present-but-invalid DISABLES the transport (no silent collapse to smtp.gmail.com), one warn-tier system|smtp-config-invalid appEvents row per PROCESS carrying key+reason+value LENGTH only. 11 new cases, 513 green. Also created mars/shared/md/mars-unverifiable-state.md: SMTP_HOST/PORT are Vercel-Encrypted with no read path, so the resolver makes them checked, never read. audit-mars-ca PASS:88b67f6.
Questions
Activity
-
Shipped 88b67f6 v2.65.3 (validating SMTP host/port/secure resolver, fail-closed on present-but-invalid, one warn-tier appEvents row per process with key+reason+length only) and 2dcfd63 v2.65.4 (citation correction: 88b67f6 cited MARS-604, which never existed). PTD both: deploy READY on prod alias, live /api/app-version matched 2.65.3 then 2.65.4, build errors-only empty, runtime-error window shows only a pre-existing AuthApiError group on an older deployment. audit-mars-ca PASS:88b67f6, standing over 2dcfd63 as citation-only. Companion record: mars/shared/md/mars-unverifiable-state.md (SMTP_HOST/PORT are Vercel-Encrypted, no read path; the resolver makes them checked, never read).
-
SMTP host/port/secure now resolve through a validating read that disables the transport on invalid env, replacing the || default on the email-send path; adds mars-unverifiable-state.md (SMTP_HOST/PORT last-verified-never, Vercel-Encrypted, owner coder-mars-cc)