From e044a8c2aca1e78761f42aa08bc781b17ffa0612 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Thu, 16 May 2024 11:32:48 +0530 Subject: [PATCH] chore: encode email before passing it as a query param (#4468) --- packages/constants/src/auth.ts | 4 ++-- space/components/accounts/auth-forms/password.tsx | 2 +- space/helpers/authentication.helper.tsx | 4 ++-- web/components/account/auth-forms/password.tsx | 2 +- web/helpers/authentication.helper.tsx | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/constants/src/auth.ts b/packages/constants/src/auth.ts index 86e75f4ff..c12b63d63 100644 --- a/packages/constants/src/auth.ts +++ b/packages/constants/src/auth.ts @@ -130,7 +130,7 @@ const errorCodeMessages: { Your account is already registered.  Sign In @@ -171,7 +171,7 @@ const errorCodeMessages: { No account found.  Create one diff --git a/space/components/accounts/auth-forms/password.tsx b/space/components/accounts/auth-forms/password.tsx index 8148ee405..a4b22f0a0 100644 --- a/space/components/accounts/auth-forms/password.tsx +++ b/space/components/accounts/auth-forms/password.tsx @@ -69,7 +69,7 @@ export const PasswordForm: React.FC = (props) => {
{isSmtpConfigured ? ( Forgot your password? diff --git a/space/helpers/authentication.helper.tsx b/space/helpers/authentication.helper.tsx index 2626b35c2..60e103e6f 100644 --- a/space/helpers/authentication.helper.tsx +++ b/space/helpers/authentication.helper.tsx @@ -116,7 +116,7 @@ const errorCodeMessages: { Your account is already registered.  Sign In @@ -155,7 +155,7 @@ const errorCodeMessages: { No account found.  Create one diff --git a/web/components/account/auth-forms/password.tsx b/web/components/account/auth-forms/password.tsx index 354037275..999a49ea2 100644 --- a/web/components/account/auth-forms/password.tsx +++ b/web/components/account/auth-forms/password.tsx @@ -76,7 +76,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { {isSMTPConfigured ? ( captureEvent(FORGOT_PASSWORD)} - href={`/accounts/forgot-password?email=${email}`} + href={`/accounts/forgot-password?email=${encodeURIComponent(email)}`} className="text-xs font-medium text-custom-primary-100" > Forgot your password? diff --git a/web/helpers/authentication.helper.tsx b/web/helpers/authentication.helper.tsx index 0f331394b..3de5132f7 100644 --- a/web/helpers/authentication.helper.tsx +++ b/web/helpers/authentication.helper.tsx @@ -127,7 +127,7 @@ const errorCodeMessages: { Your account is already registered.  Sign In @@ -169,7 +169,7 @@ const errorCodeMessages: { No account found.  Create one