cap password length at 40 on registration

due to client limitations
This commit is contained in:
aronwk-aaron 2022-12-29 13:12:22 -06:00
parent b8bd7c6cba
commit 98c61bcaf1

View File

@ -75,10 +75,12 @@ class CustomRegisterForm(FlaskForm):
password = PasswordField('Password', validators=[
DataRequired(),
password_validator
password_validator,
validators.length(max=40, message="The maximum length of the password is 40 characters due to game client limitations")
])
retype_password = PasswordField('Retype Password', validators=[
validators.EqualTo('password', message='Passwords did not match')
validators.EqualTo('password', message='Passwords did not match'),
validators.length(max=40, message="The maximum length of the password is 40 characters due to game client limitations")
])
invite_token = HiddenField('Token')