diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2025-09-20 21:12:47 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2025-09-20 21:12:47 -0700 |
| commit | 1905b90698b8171880b812bec1fcafaf0e35dc6a (patch) | |
| tree | d676478bde0005179244c6baf06bdfb0b847c0c1 /roseh.moe.go | |
| parent | 34a2a69a28457f5b58c357cb19f091330cca6110 (diff) | |
| download | roseh.moe-1905b90698b8171880b812bec1fcafaf0e35dc6a.tar.zst | |
Ditch HTMX
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 |
