Skip to content

Move the forms to Cloudflare Turnstile - #77

Merged
ramereth merged 1 commit into
masterfrom
turnstile
Sep 18, 2026
Merged

ramereth merged 1 commit into
masterfrom
turnstile

Conversation

@ramereth

Copy link
Copy Markdown
Contributor

Moves all four site forms from the Google reCAPTCHA v2 checkbox to Cloudflare Turnstile. Turnstile is free with no request cap, and it is better at stopping the spam currently reaching the ticket queues.

Spam is getting through the v2 checkbox, which is the variety solver farms target. Google has also moved classic reCAPTCHA keys into Google Cloud, where the free allowance is 10,000 verifications a month, and exceeding it without billing attached starts failing requests. Formsender now accepts Turnstile, so the widget is the only thing that has to change on this side.

Every form already includes the shared formsender fields partial, so swapping the widget there covers the contact, HUB, Passport and ISA RFC forms at once. The one piece that is not markup is the submit gate in the form script, which called into the reCAPTCHA global to check whether the challenge had been solved. It now reads the hidden input the Turnstile widget writes into the form being submitted, which is worth a look first in the diff.

  • Render the Turnstile widget and load its script from the shared formsender fields partial, which every form already includes
  • Gate submission on the hidden cf-turnstile-response input the widget writes into the form, replacing the call into the reCAPTCHA global
  • Point production at the openpowerfoundation.org Turnstile site key, which is public and pairs with the secret in the formsender-opf data bag
  • Point development at Cloudflare's always-passing test key, which works from localhost against a local formsender and is the right value there permanently

Depends on osuosl/formsender#384 and osuosl-cookbooks/osl-app#168 landing first, and on app2 having converged, or every submission will be rejected.

References:

Spam is getting through the reCAPTCHA v2 checkbox, and Google has moved classic
reCAPTCHA keys into Google Cloud with a free tier of 10,000 verifications a
month. Formsender now accepts Cloudflare Turnstile, which is free with no
request cap, so move all four forms over to it.

- Render the Turnstile widget and load its script from the shared formsender
  fields partial, which every form already includes
- Gate submission on the hidden cf-turnstile-response input this form carries,
  replacing the call into the reCAPTCHA global
- Point production at the openpowerfoundation.org Turnstile site key, which is
  public and pairs with the secret in the formsender-opf data bag
- Point development at Cloudflare's always-passing test key, which works from
  localhost against a local formsender

The osl-app change that passes TURNSTILE_SECRET to the container has to
converge before this is merged, or the forms will reject every submission.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Lance Albertson <lance@osuosl.org>
@ramereth
ramereth merged commit 4d4d9d2 into master Sep 18, 2026
@ramereth
ramereth deleted the turnstile branch September 18, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant