From ec26daa6793167cee3736a66b5506925e09272c8 Mon Sep 17 00:00:00 2001 From: Martin Thielecke Date: Fri, 31 Jul 2015 18:34:36 +0000 Subject: [PATCH] fixed username --- login.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/login.go b/login.go index 513e4f4..2124942 100644 --- a/login.go +++ b/login.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http" "strconv" + "strings" "github.com/flosch/pongo2" "github.com/gorilla/mux" @@ -13,7 +14,7 @@ import ( func loginHandler(res http.ResponseWriter, r *http.Request, session *sessions.Session, ctx *pongo2.Context) (*string, error) { var ( - username = r.FormValue("username") + username = strings.ToLower(r.FormValue("username")) password = fmt.Sprintf("%x", sha1.Sum([]byte(cfg.PasswordSalt+r.FormValue("password")))) )