On Thu, Mar 14, 2013 at 12:55 PM, Brion Vibber bvibber@wikimedia.orgwrote:
As some folks may recall, an action=createaccount was added to the API a few weeks ago. Unfortunately the first pass didn't include CAPTCHA support, so we haven't been able to use it for the live sites yet (which use ConfirmEdit's "FancyCaptcha" mode). We expect to start using this in the next couple weeks for the mobile Commons apps, so it's time to make it captcha-friendly...
I've made a first stab at adding support, based on the existing captcha interfaces for login and editing:
MediaWiki core: https://gerrit.wikimedia.org/r/53793 ConfirmEdit ext: https://gerrit.wikimedia.org/r/53794
So far I've tested it with the default 'math captcha' mode, with this test rig: https://github.com/brion/mw-createaccount-test
I've also confirmed now that it works with FancyCaptcha, which is what we still use on the Wikimedia sites.
The gerrit patchsets have been updated for consistency with the other API modules already providing the captcha interface, such as ApiEdit and ApiLogin: * return result=Failure instead of result=needcaptcha for consistency (presence of the 'captcha' field takes care of discovery) * fix a case where an extension that used the hook but didn't return error data would fall through to create account * a little general cleanup
I've noticed that a lot of the discussion in this thread has been questioning whether support for non-default captcha modules will work and how; we should consider the API captcha interface still provisional, but note that it already exists and is in usage for edit captchas and login throttling!
[I like the idea of being able to provide an HTML blob or iframe link, which might work for things like recaptcha... note that there *is* support in ConfirmEdit's ReCaptcha module for the API responses but I haven't tested to confirm it works.]
Any further issues that would delay short-term adoption of this addition? I'd love to get it live in the next week or two so we can start using it in the Commons apps for Android and iPhone. :)
-- brion