Commit graph

3507 commits

Author SHA1 Message Date
Kosta Harlan 10b9276855
Allow showing a CAPTCHA in response to AbuseFilter consequence
Why:

- We want to allow administrators to invoke a CAPTCHA
  if an AbuseFilter is configured to do so.

What:

- Implement the AbuseFilterCustomActions hook and define
  CaptchaConsequence, which will inform AbuseFilter's implementation
  of onConfirmEditTriggersCaptcha that it should show a CAPTCHA
- Deliberately do not register the "showcaptcha" action as a "dangerous
  action", because filters that use this action are aimed at bot
  traffic, and we don't want a bot to be able to get past the
  "showcaptcha" action just by making repeat requests

Soft depends on I110a5f5321649dcf85993a0c209ab70b9886057c

Bug: T20110
Change-Id: Ie87e3d850541c7dc44aaeb6b30489a32a0c8cc60
2024-05-12 16:16:11 +02:00
Translation updater bot 3d191873f4 Localisation updates from https://translatewiki.net.
Change-Id: I0fddd83200da2c398438b60d11b6f9f42acda854
2024-05-10 09:28:36 +02:00
Translation updater bot db96b6a22f Localisation updates from https://translatewiki.net.
Change-Id: I1a069b44fb7da5601872a12ab0ba37120f165e26
2024-05-06 09:25:26 +02:00
libraryupgrader 3b2a2a8b42 build: Updating composer dependencies
* mediawiki/minus-x: 1.1.1 → 1.1.3
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

Change-Id: I188353ff385bcaf437b6fd71571a25312e70a249
2024-05-06 05:15:53 +00:00
Kosta Harlan 41fbcb2963
phan: Load AbuseFilter in phan config
See I76e8ce9c1533ca8ad47abb1ffd2e683cc85b78aa for CI config change

Change-Id: Iecea4af54b972637fb2c4c2ce234708f8eb4e4b9
2024-05-05 11:46:45 +03:00
Bartosz Dziewoński f68465095b QuestyCaptcha: Remove mw-ui-input class that does nothing
It does nothing, because the 'mediawiki.ui.input' module is not loaded
on the edit form, so it doesn't apply any styles.

I'm not sure if it ever worked, but it definitely hasn't worked since
at least 2021 (that's the oldest wiki I found on Patchdemo that has
the class but doesn't have the styling).

Change-Id: Ibd9d3df3aa74eb22c6b7fed97076056fc4187c66
2024-04-29 19:20:21 +02:00
Fomafix efe5dd0cfb Inject service MainWANObjectCache into Hooks
Change-Id: Ib6561efa67e61b5a5cf93b284e36fcf3f49c603b
2024-04-26 20:49:06 +00:00
Translation updater bot faf0e4f3b5 Localisation updates from https://translatewiki.net.
Change-Id: I2202f6c2cc9e7fd234ccc858d40f1f31a5dc2e26
2024-04-26 09:47:57 +02:00
jenkins-bot 8d7f4815f1 Merge "Add missing style dependency to "ext.confirmEdit.fancyCaptcha"" 2024-04-24 15:44:17 +00:00
jenkins-bot a73f8ad925 Merge "Remove unused module "ext.confirmEdit.fancyCaptchaMobile"" 2024-04-24 15:44:16 +00:00
Translation updater bot 1b66676367 Localisation updates from https://translatewiki.net.
Change-Id: I2d976697b9a33221bc97e9a278ddd8ab740c57eb
2024-04-24 09:18:35 +02:00
jenkins-bot dd65737f3a Merge "Fix captcha image overflow" 2024-04-23 22:41:35 +00:00
Bartosz Dziewoński 24ca43e5ca Fix captcha image overflow
Bug: T358024
Change-Id: Ibbbd434a06f683ed9aae0d80ec04ee4df9864a50
2024-04-24 00:16:15 +02:00
Bartosz Dziewoński 5f0bbc59f8 Add missing style dependency to "ext.confirmEdit.fancyCaptcha"
This causes an icon to appear the "Reload" link/button
when the CAPTCHA is shown e.g. within VisualEditor.

Change-Id: Ie883e9fca419d278d2daa91166eb06339e183f9b
2024-04-23 22:14:44 +00:00
Bartosz Dziewoński 920113eca9 Remove unused module "ext.confirmEdit.fancyCaptchaMobile"
Unused since change 8fc5bd264017587415c303b4f6a7718277a49840
in MobileFrontend (2015).

There was once a FIXME comment to remove it, but it was lost
in change bf412aad28 (also 2015).

Change-Id: I418e5d68b94ecffc5381f98419bdf38b18c96cd5
2024-04-23 22:14:35 +00:00
Translation updater bot 43fb582b4e Localisation updates from https://translatewiki.net.
Change-Id: Ic81a2c3c2e548b088df32939f2625fc4eb4f8b1f
2024-04-22 09:27:59 +02:00
Translation updater bot ae3c8bd11e Localisation updates from https://translatewiki.net.
Change-Id: Ic97849ca5ca94bd1911197f11e83146a3d443038
2024-04-19 09:46:09 +02:00
libraryupgrader 6e9b418ca4 build: Updating eslint-config-wikimedia to 0.27.0
Change-Id: I5f047afc81a078695b251aee3e4db23c486379c5
2024-04-16 23:52:19 +00:00
Translation updater bot 0edb4f4457 Localisation updates from https://translatewiki.net.
Change-Id: Ic8f74fa28ee56c93d868b020ca83901860cea107
2024-04-16 09:27:40 +02:00
jenkins-bot 174894bdf6 Merge "Remove MathCaptcha" 2024-04-15 13:48:36 +00:00
Translation updater bot 0285e163bc Localisation updates from https://translatewiki.net.
Change-Id: I171d1723a1fed26a881b0a3f83abe60528b6f019
2024-04-15 09:27:45 +02:00
Translation updater bot ec94dcb3ac Localisation updates from https://translatewiki.net.
Change-Id: Ief5c9c074daaac5c5ce3c5950482bc633f044ed6
2024-04-11 09:21:07 +02:00
Translation updater bot 20f3fb9b43 Localisation updates from https://translatewiki.net.
Change-Id: I8e8dff5cbe9b042f92f90e7380925132be888d7e
2024-04-05 09:37:54 +02:00
Translation updater bot 0802b72ece Localisation updates from https://translatewiki.net.
Change-Id: I31c2abbba4186a5048f2d1e94958ebc506411f4d
2024-04-04 09:37:35 +02:00
Amir Sarabadani 40fb527c59 Remove MathCaptcha
It relies on PNG mode of Math extension which has been removed since
I595926027433182cc03

Bug: T360978
Change-Id: I650d096dfd83c725e30242eb5795236c59fe7883
2024-04-01 18:24:00 +02:00
Umherirrender b2ec6b2955 Replace isset() with null check in SimpleCaptcha
Found usage of isset() on expression $this->captchaSolved that appears
to be always set. isset() should only be used to suppress errors. Check
whether the expression is null instead.
See https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset

Change-Id: I5520786060b2aa2fca81acd40924d84e94e8dff2
2024-04-01 13:38:44 +02:00
Timo Tijhof 5c1fc0f2e0 tests: Remove redundant wgMainCacheType=hash
Follows-up 5b3765f7b, which refactored the way this was set.

Introduced in 2016 with 31c59374a, but redundant since 2020 with
commit c6c62e2c8f in MediaWiki core.

Bug: T139216
Change-Id: Iaf0a2f60833797ecf0b74f69dd797ca3c53cc550
2024-03-29 23:03:41 +00:00
Translation updater bot 42b6bcaa3b Localisation updates from https://translatewiki.net.
Change-Id: I0679113b316d84fb9fab215d5f9720ac6a6f6f27
2024-03-29 08:46:30 +01:00
Translation updater bot a59f780cd4 Localisation updates from https://translatewiki.net.
Change-Id: I73e0b0a7b13210208e6f039f3264c29690be3011
2024-03-26 08:19:21 +01:00
Umherirrender bcdde67ebd Add explicit parentheses around mixed boolean operator
Mixing different binary boolean operators within an expression
without using parentheses to clarify precedence is not allowed (T358966)

Change-Id: I908691348d259d868f39a7737614be82c9ce0c75
2024-03-23 00:52:19 +01:00
Translation updater bot a1a566a1c1 Localisation updates from https://translatewiki.net.
Change-Id: Ifd8ee307ae123da45da4a5b1fc67d2fcbf8f8e21
2024-03-22 08:43:58 +01:00
Reedy ec6f8c5fee GenerateFancyCaptchas: Include stderr result if captcha.py returns an error code
Bug: T360653
Change-Id: Ie998180e5a74441c76e236074961cf0d34aaecaf
2024-03-21 16:40:49 +00:00
Translation updater bot 8a94dca6f2 Localisation updates from https://translatewiki.net.
Change-Id: Iff70272e0cad637401c9fc55e1cdf987c38d383d
2024-03-20 08:23:23 +01:00
Translation updater bot 1ca0b338e2 Localisation updates from https://translatewiki.net.
Change-Id: I39ba5cf12e9a0d86e718d26442bc81c8bfedb527
2024-03-19 08:24:48 +01:00
Translation updater bot 78ba529096 Localisation updates from https://translatewiki.net.
Change-Id: I90c432110e3e63db95889d7064654f660f330d6d
2024-03-18 08:30:41 +01:00
Dringsim f3cd5b0bc9
Replace usage of wfGetDB()
Bug: T357638
Change-Id: Ibb03f914f90e711d5b28fa24073428617fbaf955
2024-03-17 00:44:39 +08:00
Translation updater bot 4d3fa16089 Localisation updates from https://translatewiki.net.
Change-Id: I864416a1632386f82f0feeb2305d78c35d01d27c
2024-03-13 08:25:22 +01:00
Translation updater bot 3dd3e02b80 Localisation updates from https://translatewiki.net.
Change-Id: I5778377294be13e85203be81e668e3c28877b0a9
2024-03-12 08:24:15 +01:00
Translation updater bot fc342c4c8f Localisation updates from https://translatewiki.net.
Change-Id: Iee04a7e56831d68294f0b2fd4044694938fb5a68
2024-03-11 08:26:37 +01:00
Umherirrender af6ecdecf7 build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: I5b46168e1e845747ae0a92b28a7f9e56e06309aa
2024-03-10 17:18:48 +01:00
jenkins-bot 6588e7c57e Merge "Fix ConfirmEdit to avoid global state" 2024-03-08 16:36:47 +00:00
Translation updater bot 619143041a Localisation updates from https://translatewiki.net.
Change-Id: I44b854dfc3437ab0e2daada115b59280de018237
2024-03-08 08:22:51 +01:00
Derick Alangi 5b3765f7b5
Fix ConfirmEdit to avoid global state
ConfirmEdit will try to mess with ObjectCache::$instances, clean this
up so that we migrate consumers to go through ObjectCacheFactory.

Bug: T358346
Change-Id: I317a1a17f4f39e99a9b31660eebcd0185adb88f8
2024-03-07 15:05:23 +03:00
Translation updater bot 43f2f36462 Localisation updates from https://translatewiki.net.
Change-Id: Icb81ed4ae441b5c6582e8c3f2907a244658bd31d
2024-03-07 08:48:18 +01:00
Translation updater bot 613f419b8a Localisation updates from https://translatewiki.net.
Change-Id: I6545a2f056671afd0215a49ab8767d260e509a82
2024-03-04 08:23:10 +01:00
Translation updater bot 00741aac24 Localisation updates from https://translatewiki.net.
Change-Id: I32503e97df61b88cc7e30a7ed77767260e69e8a4
2024-02-29 08:35:45 +01:00
Translation updater bot a59c010195 Localisation updates from https://translatewiki.net.
Change-Id: I4c833ded00377a3db4dee02909410bb613110c88
2024-02-28 08:14:06 +01:00
Translation updater bot 9d93795d18 Localisation updates from https://translatewiki.net.
Change-Id: I8a282e84d78be52014b6a14a88498976012fb0b5
2024-02-27 08:19:47 +01:00
Translation updater bot be4c730cf8 Localisation updates from https://translatewiki.net.
Change-Id: Ide9e4cbcfbb694087f93b48d178ae248b0bc678c
2024-02-26 08:35:45 +01:00
Translation updater bot 6f42354e94 Localisation updates from https://translatewiki.net.
Change-Id: I12e0b745375ffd5347c8884b2996ab2084527ebe
2024-02-22 08:43:17 +01:00