mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-08 04:00:51 +08:00
feat: fix MFA + LDAP bug in /check-user-password API (#3681)
This commit is contained in:
@@ -602,7 +602,11 @@ func (c *ApiController) CheckUserPassword() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = object.CheckUserPassword(user.Owner, user.Name, user.Password, c.GetAcceptLanguage())
|
/*
|
||||||
|
* Verified password with user as subject, if field ldap not empty,
|
||||||
|
* then `isPasswordWithLdapEnabled` is true
|
||||||
|
*/
|
||||||
|
_, err = object.CheckUserPassword(user.Owner, user.Name, user.Password, c.GetAcceptLanguage(), false, false, user.Ldap != "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.ResponseError(err.Error())
|
c.ResponseError(err.Error())
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user