Files
nginx-proxy-manager/backend/internal
José M. Requena Plens e4585ac688 Stamp the password change from the app clock, not the database one
Your CI caught this: the check passed on SQLite and never fired on the
stack where the database container runs on a different timezone from the
app, so a stale token stayed valid. The comparison was between a token's
`iat`, which is UTC seconds from Node, and `auth.modified_on`, which the
driver hands back interpreted in the app's timezone. With the app on
Australia/Brisbane and the database on UTC, that column comes back ten
hours in the past and the token always looks newer than the change.

Record the moment in `auth.meta.password_changed_at` instead, written by
`setPassword` with the same `Date.now()` clock that mints `iat`. Same
unit on both sides, one clock, and no timestamp parsing: the Date and
local-string branch is gone, and so is the whole-second flooring that
Postgres microseconds made necessary.

Rows written before this have no marker and revoke nothing until their
next password change, which is the safe direction to be wrong in.
2026-09-06 20:15:12 +02:00
..
2026-08-22 23:10:26 +10:00
2026-08-22 23:10:26 +10:00
2026-08-22 23:10:26 +10:00
2026-08-26 07:39:31 +00:00
2025-10-02 08:12:28 +10:00
2026-05-13 13:40:06 +10:00
2026-05-13 13:40:06 +10:00
2025-10-02 08:10:18 +10:00
2026-05-13 13:40:06 +10:00
2026-08-22 23:10:26 +10:00