mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-09-21 17:24:26 +01:00
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.