forked from github/plane
fix: email magic sign in integrity error (#1662)
This commit is contained in:
parent
3ad3cc77f9
commit
7763cca9a2
@ -279,6 +279,8 @@ class MagicSignInGenerateEndpoint(BaseAPIView):
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
|
||||
# Clean up
|
||||
email = email.strip().lower()
|
||||
validate_email(email)
|
||||
|
||||
## Generate a random token
|
||||
@ -346,7 +348,7 @@ class MagicSignInEndpoint(BaseAPIView):
|
||||
def post(self, request):
|
||||
try:
|
||||
user_token = request.data.get("token", "").strip()
|
||||
key = request.data.get("key", False)
|
||||
key = request.data.get("key", False).strip().lower()
|
||||
|
||||
if not key or user_token == "":
|
||||
return Response(
|
||||
|
Loading…
Reference in New Issue
Block a user