Authy
This commit is contained in:
2
auth.go
2
auth.go
@ -78,7 +78,7 @@ func usePassword(user string, pass string, ip string) bool {
|
|||||||
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) {
|
||||||
log.LogWarn(fmt.Sprintf("%s attempted to use expired token. %+v", user, time.Since(tok.Timestamp)))
|
log.LogWarn("%s attempted to use expired token. %+v, %+v, %+v", user, time.Since(tok.Timestamp), tok.Timestamp, time.Now())
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if tok.IP != ip {
|
if tok.IP != ip {
|
||||||
|
|||||||
Reference in New Issue
Block a user