mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Fix add/update salted password.
This commit is contained in:
@ -153,8 +153,9 @@ func (c *ApiController) SetPassword() {
|
||||
return
|
||||
}
|
||||
|
||||
if oldPassword != targetUser.Password {
|
||||
c.ResponseError("Old password wrong.")
|
||||
msg := object.CheckPassword(targetUser, oldPassword)
|
||||
if msg != "" {
|
||||
c.ResponseError(msg)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user