Commit graph

23 commits

Author SHA1 Message Date
Max Semenik 5b7a36a521 Clean up some phpcs problems
Change-Id: Ie956fe86184535a376d0398483ac3c853fa9127c
2018-07-12 23:13:58 +00:00
C. Scott Ananian bcc9f5a9e2 Replace uses of deprecated Language::truncate()
See I2291c69d9df17c1a9e4ab1b7d4cbc73bc51d3ebb for the anticipated
hard-deprecation of this method in core.

Bug: T197492
Change-Id: I08b5c7b0c8cc1b88f07163cfd412e5d7e87c56f3
2018-06-16 09:24:51 -04:00
zoranzoki21 7e78e7ccaa Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I06e877cc7e28553c46a669970bfc64a55e386f0c
2018-02-04 09:05:40 +00:00
Kunal Mehta 78cb14cf1e Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: Ifa6b2480400a161fd931a4ab456c0dcaa809459e
2018-01-04 02:57:05 -08:00
Umherirrender 8a3c51b1db Move classes to own files
Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass

Change-Id: I88b5112d84d8983e67be1bca9f4039486bcefc6f
2017-12-16 13:32:46 +01: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
Florian Schmidt 37f2dcfd23 Rename $ceAllowConfirmedEmail to $wgAllowConfirmedEmail
The value of $ceAllowConfirmedEmail is copied to $wgAllowConfirmedEmail if
set in LocalSettings.php for backward-compatibility. However, a deprecation
warning is emitted in this case.

Bug: T162641
Change-Id: If4daf6f25f0d2b2c0f1e173ee3903063a39978bb
2017-04-17 19:26:37 +02:00
Reedy f906d4df1f require -> requires in extension.json
Follows up I72fa5e3f68c0c3de3f3ddae2fb16ba5fad6a67b2

Change-Id: I9010f1c0745082d328633091403792e58e9b8386
2017-02-20 18:17:24 +00:00
Reedy 55949565bb Remove pre-AuthManager support
Bump version to match

Fixup some whitespace. Fixup some function level documentation

Change-Id: I72fa5e3f68c0c3de3f3ddae2fb16ba5fad6a67b2
2017-02-17 13:26:46 +00:00
Reedy a2fc069174 Use an accurate number of captchas
Change-Id: Ice434235687aa68ccf37a0219d379beb97e5a8ec
2017-02-08 18:05:49 +00:00
Brad Jorsch ac97e69999 Remove pre-1.25 API compatibility code
Since this extension uses extension.json, it already requires 1.25+ so
no need to keep the old code around.

Change-Id: I31b96b0939d5321be31889422cfc703c9c6c2baa
2016-09-20 15:32:05 -04:00
jenkins-bot 77d3872753 Merge "extension.json: 1st dimension is namespace ID, so avoid re-numbering" 2016-08-29 17:23:24 +00:00
Matthew Flaschen 9a3e0f5035 extension.json: 1st dimension is namespace ID, so avoid re-numbering
Use array_plus_2d so namespace IDs don't get re-numbered.

Bug: T143516
Change-Id: I3e078ec0a1c0e595b1d5b65b5ece6fa9cb8ab5bb
2016-08-25 21:21:34 -04:00
Florian 1163b6f100 Replace the edit preview with a validation of whitelisted IP addresses
The user now can press the preview button to bring up an interpreted list
of the lines of the interface message MediaWiki:Captcha-ip-whitelist to check
if the added/remained data is (still) a valid list of (whitelisted) IP addresses.

Bug: T129757
Change-Id: Ic61f00e7f88c9290ae6e11f7258c11a730ac98c8
2016-08-21 18:54:41 +02:00
Florian Schmidt f1177dbc47 Use string for Hooks in extension.json, instead of arrays
This is a lot easier to read.

Change-Id: Iab783a120cf600c22143016e6ebaa18ef12e7c70
2016-08-18 20:10:59 +02:00
Florian Schmidt fc71c869e1 Use TitleReadWhitelist for automatic whitelist
Instead of abusing the extension.json callback.

Bug: T142259
Change-Id: I12501ebfa61a4b2f72cec1f94b86a54e56c28719
2016-08-18 20:08:51 +02: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
Bartosz Dziewoński 5c9e5cfccd Remove backwards-compatibility code using APIEditBeforeSave hook
It was only needed for MediaWiki prior to 1.25
(09a5febb7b024c0b6585141bb05cba13a642f3eb).
We no longer support those versions after
1d08dd07b8.

Bug: T137832
Change-Id: I27f244631e9dcd160bffff70349e5034f2a537ea
2016-06-16 17:54:54 +02: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
Glaisher d0adbc8f0f Allow IP whitelist to be modified on wiki
Local administrators can now use [[MediaWiki:Captcha-ip-whitelist]]
page to exempt specific IP addresses and IP ranges from captchas.
This is useful for modifying in a short notice such as editathons and
other events like this where captchas add unnecessary complexity for
new users.

The page is disabled by default and IPs should be added separated by
newlines. If any other character is found on a line, it will be ignored
but leading and trailing whitespace characters are allowed.

Bug: T103122
Change-Id: I54866b5bfca80debcf3d3fb7963932ed03b48548
2016-03-12 14:17:23 +05:00
Brian Wolff 01f565863f Show captcha if a specific user account has many failed login attempts
Use a default setting of > 20 logins in 10 minutes. In order to
achieve this many with core's default throttle's, you would have
to be attempting to login from at least 2 IP addresses.

Bug: T122164
Change-Id: Id3ea766cfb7d50444082275a628b8b2aa10e6050
2016-03-03 12:44:15 -05:00
Florian eb36aed916 Add AUTHORS file and update authors for Special:Version
The list of authors was generated with:
git log --all --format='%cN <%cE>' | sort -u

I removed duplicate entries (mostly users.mediawiki.org addresses).

Extra points:
 * Added composer.lock to gitignore

Change-Id: If3e5d3e6dada06b7230d1746932dd5bce88993e7
2015-12-06 14:21:07 +01:00
paladox 1d08dd07b8 Add extension.json, empty PHP entry point
Changed README to README.md

Moved changelog from README.md to CHANGELOG.md

Bumped version to 1.4.0. And start following semver-notation.

Bug: T88047
Change-Id: I21f417d9f5985598358d53a0afae815543f001ee
2015-10-31 19:22:16 +00:00