fix(contact): reject submissions with no Turnstile token again - #32
Merged
Conversation
The permissive setting was a stopgap from when the widget was not rendering. It let anything without a token through, which waves past the crudest spam: a bot that never runs JavaScript produces no token at all, so Turnstile was only catching the ones that tried and failed. Now that the widget is confirmed working for real visitors, a missing token is refused again. The message points anyone whose blocker eats challenges.cloudflare.com at the other contact links rather than leaving them at a dead end. Verified as an unpromoted version on real infrastructure before taking production traffic, since a Turnstile token cannot be produced from an automated browser and this same change broke the form last time.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
cjdyas-design | 9fc9e68 | Commit Preview URL Branch Preview URL |
Jul 31 2026, 07:50 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restores strict verification now that the widget is confirmed working.
The permissive setting was a stopgap from when the widget was not rendering. Allowing tokenless submissions waves past the crudest spam, since a bot that never runs JavaScript produces no token at all; Turnstile was only catching the ones that tried and failed.
The rejection message now points anyone whose blocker eats challenges.cloudflare.com at the other contact links, rather than leaving them at a dead end with no recourse.
Rolled out as an unpromoted version first and confirmed by hand in a real browser before it took any production traffic. A Turnstile token cannot be produced from an automated browser, so no test I can write covers the path that matters, and this same change took the form down last time.
Already live. 18 unit tests, 28 e2e against workerd, typecheck and build clean.