disallow silly passwords

This commit is contained in:
rimu 2024-01-25 14:01:29 +13:00
parent 612f60f12d
commit 686ac36ac7

View file

@ -44,6 +44,9 @@ class RegistrationForm(FlaskForm):
if not password.data:
return
if password.data == 'password' or password.data == '12345678' or password.data == '1234567890':
raise ValidationError(_l('This password is too common.'))
first_char = password.data[0] # the first character in the string
all_the_same = True