diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-10-03 20:53:17 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-10-03 20:53:17 +0200 |
commit | 986eb0cd93a8f11ff73e3f17d8dabb6d4260c67e (patch) | |
tree | f0198af6854ca4c3b13495eb8e3feb5788251a44 /auth.go | |
parent | 3234c5ec777117d429bdc04dcf10c30094079e57 (diff) | |
download | gosten-986eb0cd93a8f11ff73e3f17d8dabb6d4260c67e.tar.gz gosten-986eb0cd93a8f11ff73e3f17d8dabb6d4260c67e.tar.bz2 gosten-986eb0cd93a8f11ff73e3f17d8dabb6d4260c67e.zip |
Fix CSRF handling, esp. when errors occur in form
Diffstat (limited to '')
-rw-r--r-- | auth.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -119,9 +119,9 @@ func loginPage() http.HandlerFunc { if session(r).Authenticated { http.Redirect(w, r, "/", http.StatusFound) } - showLoginPage(w, User{ - Csrf: CsrfField(r), - }) + u := User{} + u.SetCsrfField(r) + showLoginPage(w, u) } } |