fix: exit reset password request before passwords are compared (#13856)

This commit is contained in:
Colin Adler
2024-07-09 14:28:39 -05:00
committed by GitHub
parent 3894ae17a7
commit d50ffa78f6
5 changed files with 47 additions and 4 deletions

View File

@ -913,6 +913,11 @@ func (api *API) putUserPassword(rw http.ResponseWriter, r *http.Request) {
defer commitAudit()
aReq.Old = user
if !api.Authorize(r, policy.ActionUpdatePersonal, user) {
httpapi.ResourceNotFound(rw)
return
}
if !httpapi.Read(ctx, rw, r, &params) {
return
}