diff options
Diffstat (limited to '')
-rw-r--r-- | auth.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -106,6 +106,7 @@ type User struct { Password string `form:"type=password;options=required"` RememberMe bool `form:"type=checkbox;value=y;options=checked"` Errors []error `form:"-"` + Csrf } func showLoginPage(w http.ResponseWriter, u User) { @@ -117,7 +118,9 @@ func loginPage() http.HandlerFunc { if session(r).Authenticated { http.Redirect(w, r, "/", http.StatusFound) } - showLoginPage(w, User{}) + showLoginPage(w, User{ + Csrf: CsrfField(r), + }) } } |