Commit graph

3442 commits

Author SHA1 Message Date
Translation updater bot 73055f3c5f
Localisation updates from https://translatewiki.net.
Change-Id: Id5141b5841e52f22d8958daa99db01ab2d01e1c8
2024-07-08 09:32:41 +02:00
Translation updater bot 55687b56bb
Localisation updates from https://translatewiki.net.
Change-Id: Idc4b7c9bae3259018193d319ddabbfd4ef5333ed
2024-07-04 09:23:29 +02:00
Translation updater bot 09feb5b975
Localisation updates from https://translatewiki.net.
Change-Id: I81142672d5e95bf76c7eb30773c0ec0c403657c1
2024-07-01 09:24:59 +02:00
Kosta Harlan 3b195090fe SimpleCaptcha: Allow invoking CAPTCHA display from other extensions
Why:

- In the production WMF deployment of AbuseFilter and ConfirmEdit, we
  load ConfirmEdit first, then AbuseFilter. That means that
  ConfirmEdit's onEditFilterMergedContent hook fires before
  AbuseFilter's. The problem is that AbuseFilter uses
  onEditFilterMergedContent to evaluate its rules and consequences, so
  an AbuseFilter rule that defines a "showcaptcha" consequence becomes a
  no-op, as it fires after ConfirmEdit has already decided to show or
  not show a CAPTCHA to a user.
 - All of that is to say: we need a way to tell ConfirmEdit to show a
   CAPTCHA at the time that AbuseFilter's consequences are invoked,
   which could be before or after ConfirmEdit's EditFilterMergedContent
   hook invocation, depending on how the wiki has decided to load the
   extensions

What:

- Define a flag for "shouldForceShowCaptcha", that other extensions can
  set on the SimpleCaptcha base class to indicate that ConfirmEdit must
  show a CAPTCHA (users with "skipcaptcha" right are still exempt)
- Check the isCaptchaSolved() and shouldForShowCaptcha() flags in
  ::triggersCaptcha, and also check if ConfirmEdit's
  EditFilterMergedContent hook already ran
- In CaptchaConsequence, set the forceShowCaptcha property on the
  SimpleCaptcha base class
- [misc] Add getter/setter for the captchaSolved property and the other
  new class properties

Depends-On: I7dd3a7c41606dcf5123518c2d3d0f4355f5edfd3
Bug: T20110
Change-Id: Idc47bdae8007da938f31e1c0f33e9be4813f41d7
2024-06-26 16:07:44 +00:00
Translation updater bot 889fe29002
Localisation updates from https://translatewiki.net.
Change-Id: Icd7436b856f4cebf64144c0e211e0a5c2dc237a5
2024-06-25 09:29:58 +02:00
Jack Phoenix b17f585275 QuestyCaptcha: trim trailing spaces from the user-submitted CAPTCHA answer
Bug: T368112
Change-Id: Id9257cb3319096852710ef2102ea9b596acf194b
2024-06-23 11:17:23 +03:00
Translation updater bot 6b9452191f
Localisation updates from https://translatewiki.net.
Change-Id: I99046e4c889e030143bd1de0d5125f7c3cf7aece
2024-06-21 09:41:36 +02:00
libraryupgrader d73defaaed build: Updating npm dependencies
* eslint-config-wikimedia: 0.28.0 → 0.28.2
* grunt-stylelint: 0.20.0 → 0.20.1
* stylelint-config-wikimedia: 0.17.1 → 0.17.2

Change-Id: I03344db83adbac4fee93c7672dcac1d2d51d3873
2024-06-20 05:31:04 +00:00
Translation updater bot 9a9abf245c
Localisation updates from https://translatewiki.net.
Change-Id: I890fb9c59e90974f90c45e386ed2105a0d53397d
2024-06-19 09:22:07 +02:00
Translation updater bot 586a1ba6f6
Localisation updates from https://translatewiki.net.
Change-Id: Ic92f4878b81df76d5259e9abe2ab4175caac1076
2024-06-18 09:27:22 +02:00
Translation updater bot 4d78eaabec
Localisation updates from https://translatewiki.net.
Change-Id: I99a6dea5628e839a894544c7495feee4391f2090
2024-06-17 09:30:29 +02:00
Translation updater bot 62d88d6cb3
Localisation updates from https://translatewiki.net.
Change-Id: Idc8b68e044e8efad116d1442235396715dc2676b
2024-06-14 09:48:40 +02:00
jenkins-bot 0b648c2348 Merge "Use ObjectCacheFactory methods" 2024-06-13 13:50:57 +00:00
Translation updater bot 5ca316a3e3
Localisation updates from https://translatewiki.net.
Change-Id: Ie5b02afc5556c5b8f3ef76f2030518a5187c88d0
2024-06-12 09:21:51 +02:00
Translation updater bot 16ff42311a Localisation updates from https://translatewiki.net.
Change-Id: Iaed8103a5877eb3589bd0e2e4866d57fbb3452fc
2024-06-11 09:54:01 +02:00
Translation updater bot a3ffa72ace Localisation updates from https://translatewiki.net.
Change-Id: I9659ecf89768763e3d2e5bf58c6382eae7019d80
2024-06-10 09:55:07 +02:00
Wandji69 4e0570e5cf Use ObjectCacheFactory methods
Bug: T363770
Change-Id: I66ffd2d559a22c72a72b1f664a9332900704d503
2024-06-10 02:37:01 +01:00
jenkins-bot 47dffc154b Merge "build: Updating npm dependencies" 2024-06-09 12:51:57 +00:00
Umherirrender 81d0c7bcd4 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I325f5bab163cddf76dbf8d5a6eca35a7ed7b6df7
2024-06-08 23:46:45 +02:00
libraryupgrader a8c5016096 build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
  The following rules are failing and were disabled:
  * ReCaptchaNoCaptcha/resources/ve-confirmedit-reCaptchaNoCaptcha:
    * no-jquery/no-extend
  * Turnstile/resources/ve-confirmedit-turnstile:
    * no-jquery/no-extend
  * hCaptcha/resources/ve-confirmedit-hCaptcha:
    * no-jquery/no-extend

* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: I8045a843b3e9b6a67e07d580ce07dc6afeaeab2d
2024-06-07 15:07:52 +00:00
Translation updater bot 8e9edd424e Localisation updates from https://translatewiki.net.
Change-Id: I0df8fa119d1d1bb1f64a9e1bf1e5caed43c2c0d2
2024-06-05 09:22:41 +02:00
jenkins-bot dc3ea1d293 Merge "styles: Remove deprecated .background-image() mixin call" 2024-06-03 14:29:16 +00:00
Translation updater bot 0b5f73a591 Localisation updates from https://translatewiki.net.
Change-Id: I9fb7e17f10b81df8fc8a57d7c0c2ee6830568c4a
2024-06-03 09:31:21 +02:00
Volker E. 60d60aaea8 styles: Remove deprecated .background-image() mixin call
Also removing mixins import.

Bug: T366398
Change-Id: I3aecc142b9c98c1b2f314129898f55c0178fb00f
2024-05-31 22:37:57 -07:00
Translation updater bot 858f816a3a Localisation updates from https://translatewiki.net.
Change-Id: I02526e478e1f634beb4bb3e262aa065f01f35f22
2024-05-31 09:56:18 +02:00
Translation updater bot 9cb4b92414 Localisation updates from https://translatewiki.net.
Change-Id: I56725951cd6cc3befc3ee43a41150df6a51a92d3
2024-05-28 09:30:16 +02:00
Translation updater bot 0391f71eb8 Localisation updates from https://translatewiki.net.
Change-Id: Ib4ad06b036b3180ceb13ce203fc6faf88d02c485
2024-05-24 09:43:17 +02:00
Translation updater bot 557b9d2e80 Localisation updates from https://translatewiki.net.
Change-Id: I4f672493461becda0219acf90a1217e9d99a8766
2024-05-21 09:27:48 +02:00
Translation updater bot 2257420e8a Localisation updates from https://translatewiki.net.
Change-Id: I1e3685cd6d4bed45e606635d97c25d22feeeb554
2024-05-20 09:24:57 +02:00
libraryupgrader b16fa9e5b9 build: Updating grunt-banana-checker to 0.13.0
Change-Id: Ie9e8967d9e8b9157208317855d35c89bdb22e901
2024-05-18 04:45:57 +00:00
Translation updater bot 39d36fdbd4 Localisation updates from https://translatewiki.net.
Change-Id: I05a170561bc565114ea48faef89a849b5cbacc98
2024-05-17 09:48:21 +02:00
Kosta Harlan 81e9cb99c0
AbuseFilterHooks: Provide feature flags for AF custom actions
Why:

- There are issues with the current "showcaptcha" action, and we need to
  disable it until the problems are fixed

What:

- Define a feature flag to enable custom actions. For now, nothing is
  enabled.

Bug: T20110
Change-Id: I3484d66298bc9f49dfbe003a0605e2ac1a092e10
2024-05-15 08:42:44 +02:00
Translation updater bot 90dd0cfaad Localisation updates from https://translatewiki.net.
Change-Id: Ifcf3f9d979c82cc200b8ffdf4ce28eb287e25d63
2024-05-14 09:25:47 +02:00
jenkins-bot 5b8f28ffe2 Merge "Allow showing a CAPTCHA in response to AbuseFilter consequence" 2024-05-13 09:51:10 +00:00
Translation updater bot 46fd644605 Localisation updates from https://translatewiki.net.
Change-Id: I8c3bd20622fc2b96b43ee85b46cf4e0f7cbeee64
2024-05-13 09:26:52 +02:00
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