mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
fix: comparing hashed password with plain text password during password grant (#627)
* fix: use object.CheckPassword for password grant * Apply suggestions from code review fix: remove log per change request
This commit is contained in:
@ -522,7 +522,8 @@ func GetPasswordToken(application *Application, username string, password string
|
||||
if user == nil {
|
||||
return nil, errors.New("error: the user does not exist")
|
||||
}
|
||||
if user.Password != password {
|
||||
msg := CheckPassword(user, password)
|
||||
if msg != "" {
|
||||
return nil, errors.New("error: invalid username or password")
|
||||
}
|
||||
if user.IsForbidden {
|
||||
|
Reference in New Issue
Block a user