diff options
Diffstat (limited to 'app/main.py')
-rw-r--r-- | app/main.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/main.py b/app/main.py index 5672807..ed97551 100644 --- a/app/main.py +++ b/app/main.py @@ -76,6 +76,14 @@ def signup(): username = request.form["username"] password = request.form["password"] + # Verify the password meets requirements + if len(password) < 8: + return {"status": "Password must be at least 8 characters"} + if not any(char.isdigit() for char in password): + return {"status": "Password must contain at least one digit"} + if not any(char.isupper() for char in password): + return {"status": "Password must contain at least one uppercase letter"} + # Get database session db = SessionLocal() |