Base file from:
c4790b589b/tox.ini
Most failing rules disabled, rather than fixing now
Bug: T355090
Change-Id: Ie0f499809d84b94b95dddac9abd433c8f81e04ce
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
This should throw off many off-the-shelf OCRs.
Credit for this patch is Brian Wolff, I just found the code and turned
it into a patch. License: GPL V2.
Examples of output of the patch: T141490#9459799
Bug: T141490
Co-authored-by: Brian Wolff <bawolff+wn@gmail.com>
Change-Id: Ia17157d45995b78c6a73f844dfe7d20d09564748
In this patch, we can now make use of MicroStash only and
drop dead code.
At this point, we're sure that there are no captchas in the
main stash, freeing up this memory for other requests to use.
Bug: T336004
Change-Id: I6aa69636f2f94e3bd18afc66eac37146d00771d1
This has nothing to do with CAPTCHA generation, and the only thing it
needs from the SimpleCaptcha class is checking whether a CAPTCHA on
bad login is enabled at all.
Also improve comments in CaptchaPreAuthenticationProvider. I found the
session flag business really difficult to understand.
Change-Id: I8200531718aaa11effcb07539204e1a05ed432e0
Changes to the use statements done automatically via script
Addition of missing use statements done manually
Change-Id: Id44f211320e56bc83e4c8f243369dc4eb562cf37
ConfirmEdit uses MainStash as the backend to write its captchas. We
are migrating this extension to use the MicroStash store instead which
is more suitable.
This patch will store the captcha in MicroStash, read it from there
or fallback to MainStash if lookup was not successful. The code will
then clear both stores once after processing.
Migration plan
==============
step .1: Write to microstash store only, read from it or
fallback to mainstash store. Then delete from
both backends.
step .2: Read from microstash store only, delete from the
microstash store, and remove dead code afterward.
Bug: T336004
Change-Id: Ie7c50a6efe7a0aefc97a712b2ad961e7837cc4cf
Status now provides declared $statusData property for holding
arbitrary data that can be used instead.
Bug: T326479
Depends-On: Ibe3f1f8b81bcfcb18551d3ca4cda464e4bdbcbce
Change-Id: I1342a8a8ca64b4040ed2b2d101d4574aedd888af