mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: exit reset password request before passwords are compared (#13856)
This commit is contained in:
@ -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, ¶ms) {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user