Merge pull request #4118 from reasonerjt/master

Fix Nil pointer issue in login function
This commit is contained in:
Daniel Jiang 2018-01-24 18:29:41 +08:00 committed by GitHub
commit 5e5c0d4556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,6 +108,7 @@ func Login(m models.AuthModel) (*models.User, error) {
log.Debugf("Login failed, locking %s, and sleep for %v", m.Principal, frozenTime)
lock.Lock(m.Principal)
time.Sleep(frozenTime)
return user, err
}
err = authenticator.PostAuthenticate(user)