fix(auth): enforce max pass length at update

This commit is contained in:
SabreCat
2022-12-05 16:36:42 -06:00
parent 4fe8b63748
commit df25e0574d
2 changed files with 19 additions and 2 deletions

View File

@@ -289,8 +289,11 @@ api.updatePassword = {
newPassword: {
notEmpty: { errorMessage: res.t('missingNewPassword') },
isLength: {
options: { min: common.constants.MINIMUM_PASSWORD_LENGTH },
errorMessage: res.t('minPasswordLength'),
options: {
min: common.constants.MINIMUM_PASSWORD_LENGTH,
max: common.constants.MAXIMUM_PASSWORD_LENGTH,
},
errorMessage: res.t('passwordIssueLength'),
},
},
confirmPassword: {