chore: encode email before passing it as a query param (#4468)

This commit is contained in:
Aaryan Khandelwal 2024-05-16 11:32:48 +05:30 committed by GitHub
parent 92c5ccef3d
commit e044a8c2ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View file

@ -76,7 +76,7 @@ export const AuthPasswordForm: React.FC<Props> = observer((props: Props) => {
{isSMTPConfigured ? (
<Link
onClick={() => 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?

View file

@ -127,7 +127,7 @@ const errorCodeMessages: {
Your account is already registered.&nbsp;
<Link
className="underline underline-offset-4 font-medium hover:font-bold transition-all"
href={`/sign-in${email ? `?email=${email}` : ``}`}
href={`/sign-in${email ? `?email=${encodeURIComponent(email)}` : ``}`}
>
Sign In
</Link>
@ -169,7 +169,7 @@ const errorCodeMessages: {
No account found.&nbsp;
<Link
className="underline underline-offset-4 font-medium hover:font-bold transition-all"
href={`/${email ? `?email=${email}` : ``}`}
href={`/${email ? `?email=${encodeURIComponent(email)}` : ``}`}
>
Create one
</Link>