mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 23:27:31 +00:00
1fb20a542c
An open WebSocket outlived what it was opened with. Ending a user's sessions (a password change or reset, an admin password change or MFA reset, signing out other devices, a single session revoked) left their sockets in every room and on their user channel, so a stolen session kept listening. A backup restore or the demo reset put another database in place while every socket stayed in its rooms, and on SQLite a restored id can name another trip. Ending a session now closes the user's sockets, and every reopen of the database closes all of them; a client whose session still holds connects again and joins what it may. A join asks once more from inside the room, so a removal that committed while its first answer was on the way cannot leave it behind. The trip recheck always names its trip, and its checks are covered branch by branch.