From 8741c301d5ebe669db215e9b9e9e4d324558faa7 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sun, 2 Oct 2022 14:09:36 -0400 Subject: [PATCH] Fix password length check. --- undercover/routes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/undercover/routes.py b/undercover/routes.py index 8c73330..c84c5cd 100644 --- a/undercover/routes.py +++ b/undercover/routes.py @@ -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: