wutzcalc/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris fd04564602 admin: expire sessions server-side, mask unconfigured-password 500
Two low-severity findings from the #47 review round (#52):

1. validSessions was a bare Set<string> — the 7-day cookie maxAge was a
   browser-side hint only, so a token stayed valid forever server-side
   until an explicit /admin/logout or a process restart. Now a
   Map<token, expiry>, checked and pruned lazily on lookup, with an
   opportunistic full sweep on login so an abandoned session doesn't
   linger in memory indefinitely either.

2. /admin/login on a misconfigured deploy (ADMIN_PASSWORD unset)
   returned the literal string "ADMIN_PASSWORD not set" to an
   unauthenticated caller, bypassing the generic-500 masking every other
   500 in the app goes through (see index.ts's error handler) — minor
   recon value for anyone probing. Now logged server-side and masked
   like any other internal error.
2026-07-31 01:21:49 +02:00
..
migrations snapshot the Pfand rate used for returns, like every other money value already is 2026-07-29 20:26:52 +02:00
src admin: expire sessions server-side, mask unconfigured-password 500 2026-07-31 01:21:49 +02:00
package.json scaffold festival drink tracker (pnpm workspace, Fastify + SQLite, Preact tablet UI, admin) 2026-05-19 18:12:01 +02:00
tsconfig.json scaffold festival drink tracker (pnpm workspace, Fastify + SQLite, Preact tablet UI, admin) 2026-05-19 18:12:01 +02:00