Fix password length check.

This commit is contained in:
Sage Vaillancourt 2022-10-02 14:09:36 -04:00
parent 2b64b3bb38
commit 8741c301d5
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,8 @@ def create_account() -> Response:
if password != request.form['confirm-password']:
return render_index(error="Password and confirm password must match!", status=400)
if 64 < len(password) < 8:
password_len = len(password)
if password_len < 8 or password_len > 64:
return render_index(error="Password must be between 8 and 64 characters", status=400)
try: