Update:Guest user accounts cannot change the account password #537

This commit is contained in:
advplyr 2022-04-29 18:38:13 -05:00
parent 729fdd5c9f
commit 049ae73d74
3 changed files with 12 additions and 2 deletions

View file

@ -133,6 +133,10 @@ class MeController {
// PATCH: api/me/password
updatePassword(req, res) {
if (req.user.isGuest) {
Logger.error(`[MeController] Guest user attempted to change password`, req.user.username)
return res.sendStatus(500)
}
this.auth.userChangePassword(req, res)
}