From dfc2c62a142f95438a82e7453391b04ccdfdc146 Mon Sep 17 00:00:00 2001 From: gurusainath Date: Sat, 7 Dec 2024 16:40:30 +0530 Subject: [PATCH] fix: email check validation to handle case in-sensitive email --- apiserver/plane/authentication/views/app/check.py | 3 +++ apiserver/plane/authentication/views/space/check.py | 1 + 2 files changed, 4 insertions(+) diff --git a/apiserver/plane/authentication/views/app/check.py b/apiserver/plane/authentication/views/app/check.py index c7e4b8a5e2f..0ad1db61f38 100644 --- a/apiserver/plane/authentication/views/app/check.py +++ b/apiserver/plane/authentication/views/app/check.py @@ -60,6 +60,9 @@ def post(self, request): ) return Response(exc.get_error_dict(), status=status.HTTP_400_BAD_REQUEST) + # Lower the email + email = str(email).lower().strip() + # Validate email try: validate_email(email) diff --git a/apiserver/plane/authentication/views/space/check.py b/apiserver/plane/authentication/views/space/check.py index 9b4d8aa56d2..c8a4539b712 100644 --- a/apiserver/plane/authentication/views/space/check.py +++ b/apiserver/plane/authentication/views/space/check.py @@ -60,6 +60,7 @@ def post(self, request): ) return Response(exc.get_error_dict(), status=status.HTTP_400_BAD_REQUEST) + email = str(email).lower().strip() # Validate email try: validate_email(email)