Do not force username to always be lowercase in the DB

This commit is contained in:
Deluan
2020-09-01 18:00:19 -04:00
parent 95eea0e9f8
commit 596a4897a3
5 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ func validateUser(ctx context.Context, ds model.DataStore, username, pass, token
switch {
case jwt != "":
claims, err := auth.Validate(jwt)
valid = err == nil && claims["sub"] == username
valid = err == nil && claims["sub"] == user.UserName
case pass != "":
if strings.HasPrefix(pass, "enc:") {
if dec, err := hex.DecodeString(pass[4:]); err == nil {