From 193076636a022accaa23a14b3ff05fe4c60b3d08 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Mon, 20 May 2024 12:53:43 +0530 Subject: [PATCH 1/2] fix: instance god-mode redirection --- web/helpers/common.helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/helpers/common.helper.ts b/web/helpers/common.helper.ts index 5856b00df0..74ac8cb493 100644 --- a/web/helpers/common.helper.ts +++ b/web/helpers/common.helper.ts @@ -9,7 +9,7 @@ export const ADMIN_BASE_PATH = process.env.NEXT_PUBLIC_ADMIN_BASE_PATH || ""; export const SPACE_BASE_URL = process.env.NEXT_PUBLIC_SPACE_BASE_URL || ""; export const SPACE_BASE_PATH = process.env.NEXT_PUBLIC_SPACE_BASE_PATH || ""; -export const GOD_MODE_URL = encodeURI(`${ADMIN_BASE_URL}${ADMIN_BASE_PATH}`); +export const GOD_MODE_URL = encodeURI(`${ADMIN_BASE_URL}${ADMIN_BASE_PATH}/`); export const debounce = (func: any, wait: number, immediate: boolean = false) => { let timeout: any; From 35f3716cb5211b79ced3ed285a38111da181a1d8 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Mon, 20 May 2024 12:56:29 +0530 Subject: [PATCH 2/2] fix: magic code 500 error on wrong code or expired code (#4521) --- .../plane/authentication/provider/credentials/magic_code.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apiserver/plane/authentication/provider/credentials/magic_code.py b/apiserver/plane/authentication/provider/credentials/magic_code.py index d53ce754a4..21309ea9c4 100644 --- a/apiserver/plane/authentication/provider/credentials/magic_code.py +++ b/apiserver/plane/authentication/provider/credentials/magic_code.py @@ -88,7 +88,7 @@ class MagicCodeProvider(CredentialAdapter): if data["current_attempt"] > 2: email = str(self.key).replace("magic_", "", 1) - if User.objects.exists(email=email): + if User.objects.filter(email=email).exists(): raise AuthenticationException( error_code=AUTHENTICATION_ERROR_CODES[ "EMAIL_CODE_ATTEMPT_EXHAUSTED_SIGN_IN" @@ -144,7 +144,7 @@ class MagicCodeProvider(CredentialAdapter): return else: email = str(self.key).replace("magic_", "", 1) - if User.objects.exists(email=email): + if User.objects.filter(email=email).exists(): raise AuthenticationException( error_code=AUTHENTICATION_ERROR_CODES[ "INVALID_MAGIC_CODE_SIGN_IN" @@ -162,7 +162,7 @@ class MagicCodeProvider(CredentialAdapter): ) else: email = str(self.key).replace("magic_", "", 1) - if User.objects.exists(email=email): + if User.objects.filter(email=email).exists(): raise AuthenticationException( error_code=AUTHENTICATION_ERROR_CODES[ "EXPIRED_MAGIC_CODE_SIGN_IN"