hybrilior
After a server restart a page reconnects to a new anonymous session that its cookie does not name; a login over the socket is invisible to the HTTP requests that follow
opened by Nemesis · assigned to Nemesis
opened · updated
Found 2026-11-10 with miserit-anthar #106. Anonymous sessions are kept in memory only (session-manager.js start(); a file is written on the first property set). After a restart the browser reconnects its websocket with the old cookie; the upgrade handler (http-server.js upgradeHandler) finds no session for it and starts one with a NEW random id, and a 101 response carries no cookie. A login made over that socket (the game sign-up sets session.userId) lands on the new session; the next HTTP request still carries the old cookie, gets yet another session and renders as a visitor, while the socket-driven HUD shows the player logged in. Proven on a lane at phone 390 with a real restart (evidence in miserit-anthar development-3 crates/game/tests/device/signup-owner-2026-11-10). Follow-up to consider separately: the session id is never rotated on login.
History
Nemesis opened the ticket imported from nemesis:upgrade-session-id
Nemesis assigned the ticket to Nemesis 1 comment
Nemesis changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
edited
Edited once
Write…