From 3bba74c076deb10eb5413328d3e28992e46d1b0b Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Wed, 30 Dec 2020 12:12:06 -0500 Subject: [PATCH] Authy --- auth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth.go b/auth.go index 7d7c731..dda86eb 100644 --- a/auth.go +++ b/auth.go @@ -75,8 +75,8 @@ func tryLogin(w http.ResponseWriter, r *http.Request) { func usePassword(user string, pass string, ip string) bool { defer log.PanicSafe() log.LogInfo("%+v", toks) - tok := toks[user] - delete(toks, user) + tok := toks[strings.ToUpper(user)] + delete(toks, strings.ToUpper(user)) if tok.IP != ip { log.LogWarn(fmt.Sprintf("%s attempted to use an improper IP.", user)) return false @@ -114,7 +114,7 @@ func sendPassword(user string, ipaddr string) { log.LogErrorType(err) } now := time.Now() - toks[m.Nick] = Tokens{ + toks[strings.ToUpper(m.Nick)] = Tokens{ Username: user, IP: ipaddr, Password: str,