Log out with a form and count logouts instead of timing them (part of #256)
check / check (push) Waiting to run
check / check (push) Waiting to run
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
This commit is contained in:
@@ -10,9 +10,12 @@
|
||||
<div class="page">
|
||||
<header>
|
||||
<h1>Pixa URL Generator</h1>
|
||||
<a href="/logout">
|
||||
Logout
|
||||
</a>
|
||||
<form method="POST" action="/logout">
|
||||
{{ .CSRFField }}
|
||||
<button type="submit">
|
||||
Logout
|
||||
</button>
|
||||
</form>
|
||||
</header>
|
||||
|
||||
{{if .GeneratedURL}}
|
||||
|
||||
Reference in New Issue
Block a user