Files
pl_mail/docs/install
Paul LütznerandClaude Fable 5 9f9f2c9820 fix(backup): APP_SECRET and TRUSTED_PROXIES leave the export
Every other name left this inventory because it describes the machine.
APP_SECRET left because of what a restored copy would do.

Take stock of what this codebase derives from kernel.secret: remember-me
is the signature-based handler, so the sixty-day cookie is signed with
it; sessions and CSRF tokens die with the session; JMAP signs with the
JWT pems, whose contents travel separately; URI signing and uuid47 are
unused. Nothing on disk or in the database is encrypted under it -- that
is APP_ENCRYPTION_KEY's job, and it does travel.

So restoring it changed exactly one thing: a REMEMBERME cookie minted by
the source install kept verifying on the target. Both halves of that
check are in a v2 backup now that users travel -- the signature covers
the app secret and the password hash -- so a browser signed in to the
machine the file came from was signed in to the machine it was restored
onto, without anybody deciding that. Cookies are not scoped by port, so
two stacks on one host hand each other's browsers straight through.

TRUSTED_PROXIES goes for DATABASE_URL's reason instead: the addresses
whose X-Forwarded-* headers this install believes are a fact about what
sits in front of THIS container. KeptDeliberately and External
respectively, so old backups carrying either classify and stay inert.

Found while reproducing a 403 that turned out to be a double submit of
the 2FA form (previous commit). The stale-cookie hypothesis was
falsified as the cause of that -- a pre-restore remember-me cookie was
correctly challenged for a second factor, it did not bypass anything --
but reproducing it is what showed the cookie surviving the restore at
all, which is the property this commit removes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-09 14:49:39 +02:00
..