The script was originally looking for the field by ID. This resulted in an infinite challenge loop when saving edits through the VisualEditor.
This bug stopped our [wiki.gg] rollout of Turnstile over the network last week, so upstreaming this fix in case someone else needs it.
Bug: T361098
Change-Id: I0354a33d0d1af988c8788ad2bb021c585384b038
This is a rudimentary implementation of Cloudflare's Turnstile captcha alternative.
Since it is fairly similar to ReCaptchaNoCaptcha, there is some duplicate code used here. I opted not to use the migration path that CF has for reCAPTCHA v2 and build this as a separate implementation. After T324925, it should be easy to refactor this code.
Users should set $wgTurnstileSiteKey and $wgTurnstileSecretKey as appropriate, based on details from the Cloudflare dashboard.
Bug: T319068
Change-Id: I0d5a74655619975f0bf61b5b672159afe5f4fb00