mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-08 14:10:05 +00:00
Fix: Restored old behavior of making all usernames lowercase
This commit is contained in:
parent
dc1b44786a
commit
1c1365f3be
1 changed files with 2 additions and 1 deletions
3
login.go
3
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"))))
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue