Page MenuHomePhabricator

Add Turnstile support
Closed, ResolvedPublicFeature

Assigned To
Authored By
Bugreporter
Sep 30 2022, 6:22 PM
Referenced Files
F43428057: image.png
Mar 26 2024, 9:50 AM
Restricted File
Oct 2 2023, 11:09 PM
Restricted File
Oct 2 2023, 11:09 PM
Tokens
"Like" token, awarded by Pppery.

Description

Turnstile is a new proof-of-work CAPTCHA service developed by Cloudflare.
Turnstile has a compatible mode with reCaptcha v3. If T208829 is resolved, it will be easy to implement by re-using ReNoCatpcha class (~10 lines of code).

Documentation: https://developers.cloudflare.com/turnstile/

Event Timeline

Aklapper changed the subtype of this task from "Task" to "Feature Request".Sep 30 2022, 7:16 PM

@Bugreporter: Thanks for reporting this. For future reference, please use the feature request form (linked from the top of the task creation page) to create feature requests. Thanks.

Turnstile has compatible mode with reCaptcha v3. If T208829 is resolved, it will be easy to implement. In ~10 lines of code. (If re-use ReNoCatpcha class.)

Change 962720 had a related patch set uploaded (by Jayden Bailey; author: Jayden Bailey):

[mediawiki/extensions/ConfirmEdit@master] Add Turnstile support

https://gerrit.wikimedia.org/r/962720

Now that Turnstile is generally available, I've pushed a patch that implements it into ConfirmEdit. The code for it is very similar to ReCaptchaNoCaptcha, but I felt uncomfortable with inheriting anything from ReCap's classes given that it does have a couple of (mostly server-side API) differences, and T324925 would do a better job at genericifying JS-based captcha implementations. I tested the code on MediaWiki 1.40 across account creation, source editing, and visual editing.

Account creationEditing
{F37922045}{F37922044}

Change 962720 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] Add Turnstile support

https://gerrit.wikimedia.org/r/962720

Change 990740 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/ConfirmEdit@master] Turnstile: Minor cleanup

https://gerrit.wikimedia.org/r/990740

Change 990740 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] Turnstile: Minor cleanup

https://gerrit.wikimedia.org/r/990740

Reedy assigned this task to JaydenKieran.

@JaydenKieran

I apologize for mentioning you. I still wanted to try to see if it is possible to get this to work on MediaWiki 1.41?
We have severe issues with spam bot registrations and hCaptcha is unfortunately absolutely ineffective. ReCaptcha v3 by Mirazhe was very effective, but was discontinued by them and no longer works starting MediaWiki 1.41. The main ConfirmEdit has no ReCaptcha v3 support and v2 and earlier are ineffective as well.
The only other option is disabling registrations until 1.42 again.

I thought I might just be able to copy your changes into a MediaWiki 1.41 installation and the Cloudflare Captcha does appear, but it goes into a verification loop, showing "Success", then starting "Verficiation" again, showing "Success" and repeating that about 10 times until a rate limit reached error appears:

image.png (1×2 px, 1 MB)

This seems to only happen on Visual Editor - it works correctly on the registration page.