|
|
@ -74,6 +74,7 @@ func tryLogin(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
|
|
|
|
|
|
func usePassword(user string, pass string, ip string) bool { |
|
|
|
func usePassword(user string, pass string, ip string) bool { |
|
|
|
defer log.PanicSafe() |
|
|
|
defer log.PanicSafe() |
|
|
|
|
|
|
|
log.LogInfo("%+v", toks) |
|
|
|
tok := toks[user] |
|
|
|
tok := toks[user] |
|
|
|
delete(toks, user) |
|
|
|
delete(toks, user) |
|
|
|
if time.Since(tok.timestamp) > (time.Minute * 5) { |
|
|
|
if time.Since(tok.timestamp) > (time.Minute * 5) { |
|
|
|