Fixed password validation on form; added lowercase option

Fixed an issue where some criteria on the form page wouldn't change to
red or green when one set one of them to 0 in the config. Also added a
lowercase option.
This commit is contained in:
2020-04-16 14:33:23 +01:00
parent e6eda227fa
commit 4df78a22c5
5 changed files with 23 additions and 12 deletions

View File

@@ -69,10 +69,11 @@ while attempts != 3:
if config.getboolean('password_validation', 'enabled'):
validator = PasswordValidator(config['password_validation']['min_length'],
config['password_validation']['upper'],
config['password_validation']['lower'],
config['password_validation']['number'],
config['password_validation']['special'])
else:
validator = PasswordValidator(0, 0, 0, 0)
validator = PasswordValidator(0, 0, 0, 0, 0)
@app.route('/getRequirements', methods=['GET', 'POST'])