diff options
Diffstat (limited to 'roseh.moe.go')
| -rw-r--r-- | roseh.moe.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roseh.moe.go b/roseh.moe.go index 3a8f0ef..cd56353 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -180,14 +180,14 @@ var ( ) type loginTemplateArgs struct { - Error string + Error bool Redirect string } func login(w http.ResponseWriter, r *http.Request) { pwHash := sha512.Sum512([]byte(r.FormValue("password"))) if subtle.ConstantTimeCompare(pwHash[:], notepadPassword) == 0 { - if err := loginTemplate.Execute(w, loginTemplateArgs{Error: "Incorrect password", Redirect: r.FormValue("redirect")}); err != nil { + if err := loginTemplate.Execute(w, loginTemplateArgs{Error: true, Redirect: r.FormValue("redirect")}); err != nil { log.Printf("Warning: login: %s", err) } return |
