CluPilotCloud/app
nexxo 961bf62032 Make the DSN agree with send() when a mailbox has no password
Re-review of the previous fix round found the "cannot disagree" part of
finding 4 was still open. resolution() had unified the log/array/null/
mailbox decision, but inside the mailbox branch describe() returned
$box?->address unconditionally while delegate() additionally required
isConfigured() before using it. A mailbox with active=true, a real
address, and no password produced
'mailbox://support/support@clupilot.com' — reading as entirely healthy
— while send() threw. That is exactly the harm the original finding
named: the log says fine, the mail fails.

resolution() now decides "unconfigured" too, not just "which
non-delivering mode": it calls isConfigured() itself, once, and returns
that verdict alongside the box. describe() and delegate() both branch
on the SAME result again, the same way they already did for log/array/
null — a mailbox with no password now reads as
'support@clupilot.com [unconfigured]' rather than a plain address, and
the address stays visible so an operator can tell WHICH mailbox needs
fixing.

Also renamed a test the re-review flagged as promising more than it
checked: "registers a mailer per purpose without touching the database
at boot" only ever verified the config array's shape — the DB-touching
claim is a separate, already-passing test just below it
(defines every purpose mailer as a plain literal...). Renamed to
"registers a mailer for every purpose". No behaviour change.

Added a test creating a mailbox with no password and asserting the DSN
both names the address AND carries the marker, plus that send() still
throws — proving agreement, not just a matching label painted on
separately. Mutated describe()'s unconfigured branch to drop the
marker: the test failed exactly on the missing 'unconfigured' string
(DSN read as a plain, healthy-looking address again). Reverted, reran,
passes.

Full suite: 667 passed. vendor/bin/pint --test clean on both files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 23:17:42 +02:00
..
Actions fix(billing): hold only what cannot be matched, and let migrations roll back 2026-07-26 13:57:11 +02:00
Console Make the private hostnames look like nothing is there, and close the way past the proxy 2026-07-27 11:26:48 +02:00
Http Let the console keep its recovery hostnames without breaking route caching 2026-07-27 06:20:44 +02:00
Livewire Editing in modals, an update button that is not gated on a stale reading, and a support page that is real 2026-07-27 17:55:49 +02:00
Mail Make the DSN agree with send() when a mailbox has no password 2026-07-27 23:17:42 +02:00
Models Reuse the existing UUID trait instead of a second copy of the logic 2026-07-27 21:31:39 +02:00
Notifications fix(engine-b): default-deny firewall, disk-based capacity, synchronous credential mail 2026-07-25 12:39:15 +02:00
Policies fix(vpn): losing the operator roles closes the owner doors by itself 2026-07-25 22:50:13 +02:00
Providers Resolve the sending mailbox when the mail goes out, not at boot 2026-07-27 22:28:37 +02:00
Provisioning Measure availability, and let a customer move down again 2026-07-27 16:41:15 +02:00
Services Make a deactivated mailbox fall back like a deleted one 2026-07-27 22:57:22 +02:00
Support Show times on the operator's clock, keep storing them in UTC 2026-07-27 17:32:21 +02:00