hide the password in the response (#8437)

pull/8445/head
Matt Hook 2023-02-10 18:26:18 +13:00 committed by GitHub
parent e255bd710f
commit 44d69f3a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -125,5 +125,8 @@ func (handler *Handler) userUpdate(w http.ResponseWriter, r *http.Request) *http
// remove all of the users persisted API keys
handler.apiKeyService.InvalidateUserKeyCache(user.ID)
// hide the password field in the response payload
user.Password = ""
return response.JSON(w, user)
}