From e26d7fd020a18e5347e970e262c48db7a684647e Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 10 Jul 2026 19:03:45 +0000 Subject: [PATCH] fix: add missing await to reCAPTCHA validation in login forms The validateRecaptcha() function is async and returns a Promise, but was called without await on both the checkout login form and the main login form. Since a Promise object is always truthy, !Promise is always false, which meant the reCAPTCHA check was effectively bypassed. This fix adds the missing await keyword so reCAPTCHA validation actually runs when reCAPTCHA env vars are configured. --- apps/web/app/(with-contexts)/(with-layout)/login/login-form.tsx | 2 +- apps/web/components/public/payments/login-form.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/app/(with-contexts)/(with-layout)/login/login-form.tsx b/apps/web/app/(with-contexts)/(with-layout)/login/login-form.tsx index 23e1ca455..98cc24159 100644 --- a/apps/web/app/(with-contexts)/(with-layout)/login/login-form.tsx +++ b/apps/web/app/(with-contexts)/(with-layout)/login/login-form.tsx @@ -175,7 +175,7 @@ export default function LoginForm({ setLoading(true); setError(""); - if (!validateRecaptcha()) { + if (!(await validateRecaptcha())) { return; } diff --git a/apps/web/components/public/payments/login-form.tsx b/apps/web/components/public/payments/login-form.tsx index ff800b2c4..ee3ca6d8c 100644 --- a/apps/web/components/public/payments/login-form.tsx +++ b/apps/web/components/public/payments/login-form.tsx @@ -158,7 +158,7 @@ export function LoginForm({ const requestCode = async function (email: string) { setLoading(true); - if (!validateRecaptcha()) { + if (!(await validateRecaptcha())) { return; }