diff options
author | Parker <contact@pkrm.dev> | 2024-11-05 08:12:54 -0600 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-11-05 08:12:54 -0600 |
commit | d74ae5e11603c33a5deafbcdc202fd13e57cfe0a (patch) | |
tree | dd15a9b470e15c522338d92e722df7148b25f453 | |
parent | accf52ff72e484795faacd5298a2e1584787d164 (diff) |
Comment out password restrictions
-rw-r--r-- | app/routes/user_routes.py | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/app/routes/user_routes.py b/app/routes/user_routes.py index 30f9cdf..53c8943 100644 --- a/app/routes/user_routes.py +++ b/app/routes/user_routes.py @@ -34,21 +34,21 @@ async def get_links( username = login_data.username password = login_data.password # Make sure the password meets all of the requirements - 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", - ) + # 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", + # ) # Make sure the username isn't taken user = db.query(UserModel).filter(UserModel.username == username).first() if user: @@ -101,21 +101,21 @@ async def update_pass( Update the pass of the current user account """ # Make sure the password meets all of the requirements - if len(update_data.new_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 update_data.new_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 update_data.new_password): - raise HTTPException( - status_code=status.HTTP_400_BAD_REQUEST, - detail="Password must contain at least one uppercase letter", - ) + # if len(update_data.new_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 update_data.new_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 update_data.new_password): + # raise HTTPException( + # status_code=status.HTTP_400_BAD_REQUEST, + # detail="Password must contain at least one uppercase letter", + # ) # Get the user and update the password user = db.query(UserModel).filter(UserModel.id == current_user.id).first() if not user: |