1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-09 14:40:05 +00:00

fixed username

This commit is contained in:
Martin Thielecke 2015-07-31 18:34:36 +00:00
parent dc1b44786a
commit ec26daa679

View file

@ -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"))))
)