mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: respect "Ignore unknown usernames" on password reset
Merge pull request from GHSA-v683-rcxx-vpff
(cherry picked from commit 54676eda98
)
This commit is contained in:
parent
1d4ec6cdba
commit
8ca053fad3
@ -25,6 +25,9 @@ func (l *Login) handlePasswordReset(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
user, err := l.query.GetUser(setContext(r.Context(), authReq.UserOrgID), true, false, loginName)
|
||||
if err != nil {
|
||||
if authReq.LoginPolicy.IgnoreUnknownUsernames && errors.IsNotFound(err) {
|
||||
err = nil
|
||||
}
|
||||
l.renderPasswordResetDone(w, r, authReq, err)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user