Commit graph

19 commits

Author SHA1 Message Date
Eddie Greiner-Petter 2848a699db Move "can user skip captchas" check to own function
As a direct effect
- sending emails and creating accounts now respects $wgAllowConfirmedEmail
- log messages get a bit less verbose for mail sending and creating
  accounts (but should be clear from the context what action was
  performed)
- less code duplication \o/

Indirectly, this should make solving the attached bug easy(tm), because it
just needs to add a hook to the canSkipCaptcha function.

Bug: T176589
Change-Id: Id27b0eadbab7300b9e6969d406fa6f00ef0888bf
2018-05-19 13:27:04 +00:00
libraryupgrader 08bfd32590 build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: Ide145e5755e0bec11fe19c18889c92a0e9d78037
2018-02-15 09:34:50 +00:00
Kunal Mehta e1f45829d4 Add @covers tags
Change-Id: I1e99261acb13c86e96c1b2dd1cb61918ebc660c2
2018-01-23 15:59:08 -08:00
Umherirrender 79b09f4995 Register QuestyCaptcha class ealier in unit tests
The captchas in production are registered conditional, in tests the
class needs to be added to the autoloader.
Moved this register up to setUp to detect the existing @covers correctly
by the new testValidCovers from
I1d564bcae2bfbedb004c440b90db6341148ed4ba

Change-Id: I79f225126d7bbbfd436ab165bb98a0ed9517b8bc
2017-12-27 21:59:34 +01:00
jenkins-bot 7aae3b655b Merge "Allow other extensions to setup triggers using attributes" 2017-10-24 17:49:56 +00:00
Reedy 9efde84c36 Remove pre-authmanager code
Bug: T178026
Change-Id: I8604c95e4de28cc15a821bc2cc27a3e4b239d85e
2017-10-12 01:47:11 +01:00
libraryupgrader 8b439b582d build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: I155f72352224f230e94950f149fba400f26cbe6c
2017-09-24 10:04:06 +00:00
Florian Schmidt 50bc57a200 Allow other extensions to setup triggers using attributes
Instead of misusing the config section of extension.json to declare
captcha triggers in the ConfirmEdits CaptchaTriggers config variable,
other extensions can now use the CaptchaTriggers attribute for the
exact same thing. E.g., to declare a new trigger, the following
addition to the own extension.json will register the trigger in
ConfirmEdit:

  "CaptchaTriggers": {
    "wikiforum": true
  }

This also removes the CaptchaClass config from the main extension.json
config section, and automatically sets the SimpleCaptcha module in the
getInstance() method of ConfirmEditHooks, which is a pre-requirement for
the mediawiki/core change Ieeb26011e42c741041d2c3252238ca0823b99eb4.

Bug: T152929
Change-Id: I4c5eaf87657f5dc07787480a2f1a56a1db8c714f
2017-09-02 17:45:26 +02:00
Umherirrender 1d60bc25d2 build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
Change-Id: I8d107ad6801fe1a5ce7b8feb8e1e730d504a2fb3
2017-07-08 16:04:35 +02:00
Gergő Tisza 67a909fd8a Switch TestingAccessWrapper to librarized version
Bug: T163434
Change-Id: I7d262901f0ae66f20658516bad8aa2d8de3a40f7
Depends-On: I52cc257e593da3d6c3b01a909e554a950225aec8
2017-04-20 11:35:07 +00:00
Bryan Davis ed9886f6fd Set valid $wgRateLimits in tests
Change-Id: Iacdd1719d5f08eca91de0a35c0042ffee2136f34
2016-10-03 23:36:43 -06:00
Aaron Schulz 1cf32cf036 Reset the LocalClusterObjectCache service in tests
Change-Id: I0886e749dee19d729bcd4f398d65b78aa22a8065
2016-09-12 10:24:27 +00:00
Reedy 6a8c53f6d1 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: I7105170e56c8c3ec3837dd15be869e503bccecde
2016-08-05 18:46:15 +01:00
addshore eedab34d3d Unset CaptchaStore instance before test
Caught while tests were running for core.

Fatal error:
Call to undefined method CaptchaSessionStore::clearAll() in
ConfirmEdit/tests/CaptchaAuthenticationRequestTest.php
on line 13

Change-Id: I3a9f5b315eb114cb12ea4071f8da9079f797fcf6
2016-07-28 14:59:58 +01:00
Gergő Tisza 3e3b91b527 Add AuthManager support for ReCaptcha, ReCaptchaNoCaptcha
Also remove references to "two words" from ReCaptcha labels.
The captcha image doesn't always contain two words.

Bug: T110302
Change-Id: I544656289480056152a1db195babb6dadf29bc71
2016-05-16 09:51:11 +00:00
Gergő Tisza 31c59374a4 Add AuthManager support to SimpleCaptcha, QuestyCaptcha, FancyCaptcha, MathCaptcha
Also update MathCaptcha so that it works with recent versions of
Math (and breaks with old ones). Also fix MathCaptcha API output,
which used to send the question in plaintext.

Bug: T110302
Change-Id: I0da671a546700110d789b79a3089460abd9cce3b
Depends-On: I8b52ec8ddf494f23941807638f149f15b5e46b0c
2016-05-16 09:50:25 +00:00
Kunal Mehta 9ea898ba2a build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: Ibda3fd002c577c7f7c41920d67ec44fedbd27cb8
2016-05-09 16:41:17 -07:00
Florian 2f0db346eb Move QuestyCaptcha to its own place
Bug: T88047
Change-Id: I8c8f97d49dc39445dbba9c12909b81898838a253
2015-05-23 07:49:47 +00:00
Kunal Mehta 3244e44bd2 Add basic tests for QuestyCaptcha
Change-Id: I799e110ae42cd8cd3dc2276d638039d23149ca37
2015-01-05 14:19:13 +01:00