From f0ef8275776865a2fd08a3eb2c7d88e4756219d0 Mon Sep 17 00:00:00 2001 From: Mattia Giambirtone Date: Wed, 5 Oct 2022 18:00:35 +0200 Subject: [PATCH] Minor modifications --- config.py.example | 2 +- endpoints/users.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.py.example b/config.py.example index f28db46..114a8f5 100644 --- a/config.py.example +++ b/config.py.example @@ -71,7 +71,7 @@ VALIDATE_USERNAME_REGEX = ( # - At least 2 numbers # You can change the repetitions to enforce stricter/laxer rules or empty # this field to disable weakness validation -VALIDATE_PASSWORD_REGEX = r"^(?=.*[A-Z]){2,}(?=.*[!@%#$&*_^\?\\\/(\)\+\-])+(?=.*[0-9]){2,}(?=.*[a-z]){3,}.{10,72}$" +VALIDATE_PASSWORD_REGEX = r"^(?=.*[A-Z]){2,}(?=.*[\"!@%#$&*_^\?\\\/(\)\+\-])+(?=.*[0-9]){2,}(?=.*[a-z]){3,}.{10,72}$" FORCE_EMAIL_VERIFICATION = False EMAIL_VERIFICATION_EXPIRATION = 3600 # In seconds PLATFORM_NAME = "PySimpleSocial" # Used in emails diff --git a/endpoints/users.py b/endpoints/users.py index 479b905..fd5d451 100644 --- a/endpoints/users.py +++ b/endpoints/users.py @@ -296,10 +296,10 @@ async def get_user_by_public_id( async def validate_user( - first_name: str, - last_name: str, - username: str, - email: str, + first_name: str | None, + last_name: str | None, + username: str | None, + email: str | None, password: str | None, bio: str | None, ) -> tuple[bool, str]: