From 98c61bcaf10294f8ee0adcbdaef59e246cfa4d3b Mon Sep 17 00:00:00 2001 From: aronwk-aaron Date: Thu, 29 Dec 2022 13:12:22 -0600 Subject: [PATCH] cap password length at 40 on registration due to client limitations --- app/forms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/forms.py b/app/forms.py index 1f3787b..51a4a1f 100644 --- a/app/forms.py +++ b/app/forms.py @@ -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')