From 5e1494f76d4f491c150233ba9835f7bcf91240eb Mon Sep 17 00:00:00 2001 From: Ilker Manap Date: Mon, 28 Sep 2026 17:57:18 +0200 Subject: [PATCH] Give the menu the new token after a password change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The profile page rendered after a password change carries the CSRF token set on that same response, but the menu's sign-out form was left without one — and it is the first form on the page. The e2e test that signs in, changes the password and uses the next form caught it. Co-Authored-By: Claude Opus 5.5 (1M context) --- internal/web/account.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/web/account.go b/internal/web/account.go index 7cefd473..ce6fc24d 100644 --- a/internal/web/account.go +++ b/internal/web/account.go @@ -524,6 +524,9 @@ func (p *AccountPages) renderWithCSRF(w http.ResponseWriter, r *http.Request, d.Version = p.version d.Now = time.Now().UTC().Format(time.RFC3339) d.CSRF = csrf + // The menu's sign-out form too: it is the first form on the page. + d.Nav = p.navFor(r, user, "keys") + d.Nav.CSRF = csrf _ = sess keys, err := p.keys.KeysForUser(r.Context(), user.ID)