From 691aa744a0398f185b3ca98a36fbd83806c7786c Mon Sep 17 00:00:00 2001 From: Parker Date: Sun, 10 Nov 2024 16:36:16 -0600 Subject: TOO MUCH STUFF --- app/util/check_password_reqs.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 app/util/check_password_reqs.py (limited to 'app/util/check_password_reqs.py') diff --git a/app/util/check_password_reqs.py b/app/util/check_password_reqs.py deleted file mode 100644 index dcb9bf8..0000000 --- a/app/util/check_password_reqs.py +++ /dev/null @@ -1,26 +0,0 @@ -from fastapi import HTTPException, status - - -def check_password_reqs(password: str): - """ - Make sure the entered password meets the security requirements: - 1. At least 8 characters - 2. At least one digit - 3. At least one uppercase letter - """ - if len(password) < 8: - raise HTTPException( - status_code=status.HTTP_400_BAD_REQUEST, - detail="Password must be at least 8 characters", - ) - if not any(char.isdigit() for char in password): - raise HTTPException( - status_code=status.HTTP_400_BAD_REQUEST, - detail="Password must contain at least one digit", - ) - if not any(char.isupper() for char in password): - raise HTTPException( - status_code=status.HTTP_400_BAD_REQUEST, - detail="Password must contain at least one uppercase letter", - ) - return -- cgit v1.2.3-70-g09d2