Update change password to support null or empty string passwords #4522

This commit is contained in:
advplyr 2025-07-22 15:17:00 -05:00
parent 0ae7340889
commit 45e8e72759

View File

@ -280,7 +280,7 @@ class MeController {
}
const { password, newPassword } = req.body
if (!password || !newPassword || typeof password !== 'string' || typeof newPassword !== 'string') {
if ((typeof password !== 'string' && password !== null) || (typeof newPassword !== 'string' && newPassword !== null)) {
return res.status(400).send('Missing or invalid password or new password')
}