Skip to content

Commit 8c2bb51

Browse files
dnywhcursoragent
andcommitted
fix sign-up challenge bypass
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a117200 commit 8c2bb51

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/components/SignUpForm/SignUpForm.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,15 @@ export default function SignUpForm({
110110
const shouldSkipTurnstile =
111111
isForcedE2eError || searchParams.get("e2e_skip_turnstile") === "1";
112112

113-
if (!shouldSkipTurnstile) {
114-
try {
115-
tokenToUse = await turnstile.requestToken();
116-
} catch {
113+
try {
114+
tokenToUse = await turnstile.requestToken();
115+
} catch {
116+
if (!shouldSkipTurnstile) {
117117
return;
118118
}
119-
} else {
119+
}
120+
121+
if (!tokenToUse && shouldSkipTurnstile) {
120122
formData.append("e2e_skip_turnstile", "1");
121123
}
122124

0 commit comments

Comments
 (0)