1 Commits
Author SHA1 Message Date
sneak 1d2411dd2e Log out with a form and count logouts instead of timing them (part of #256)
check / check (push) Canceled after 0s
Logging out is now a POST in the CSRF-protected route group, sent by a
form on the generator page, so a link or image on another page of the
same site cannot end every login session. The session manager keeps a
count of logouts instead of the time of the latest one: each session
carries the count at its login and is refused once it has changed. No
clock is compared, so a login after a logout always works.

Model: opus-5-5
2026-10-15 14:09:16 +00:00
+1 -1
View File
@@ -40,7 +40,7 @@ type Data struct {
ExpiresAt time.Time `json:"expires"`
// LogoutCount is the count of logouts when the session was made.
LogoutCount int64 `json:"logout_count"`
LogoutCount int64 `json:"logoutCount"`
}
// Manager handles session creation and validation using encrypted cookies.