all repos — flounder @ 0e234b1c3807aaf2a03d3e1755b90a6fc1e5e7d3

A small site builder for the Gemini protocol

Update status codes on bad login/registration
alex wennerberg alex@alexwennerberg.com
Wed, 10 Feb 2021 20:04:18 -0800
commit

0e234b1c3807aaf2a03d3e1755b90a6fc1e5e7d3

parent

b5f05ac3343ad0fa47239c73004abf55f00d363d

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M http.gohttp.go

@@ -372,6 +372,7 @@ data := struct {

Error string Config Config }{"Username or email '" + name + "' does not exist", c} + w.WriteHeader(401) t.ExecuteTemplate(w, "login.html", data) return } else {

@@ -384,6 +385,7 @@ data := struct {

Error string Config Config }{"Your account is not active yet. Pending admin approval", c} + w.WriteHeader(401) t.ExecuteTemplate(w, "login.html", data) return }

@@ -399,6 +401,7 @@ data := struct {

Error string Config Config }{"Invalid login or password", c} + w.WriteHeader(401) err := t.ExecuteTemplate(w, "login.html", data) if err != nil { serverError(w, err)

@@ -470,6 +473,7 @@ data := struct {

Config Config Errors []string }{c, errors} + w.WriteHeader(400) t.ExecuteTemplate(w, "register.html", data) } else { data := struct {