Commit graph

3452 commits

Author SHA1 Message Date
Reedy 7f02c769df FancyCaptcha: Fix return type for showImage()
Change-Id: I53875ffa1d795c267f6d9d04caa6bda4c5aba038
2024-07-19 16:02:41 +00:00
Translation updater bot 7f93c46dc5
Localisation updates from https://translatewiki.net.
Change-Id: I3844a82448f32b7694e7985b5cab6e585a1f3f17
2024-07-16 09:39:38 +02:00
Translation updater bot 819cd09d04
Localisation updates from https://translatewiki.net.
Change-Id: Ia64762335ba3e1f89f4210631e7376efdb75566c
2024-07-15 09:23:44 +02:00
Translation updater bot b07629013e
Localisation updates from https://translatewiki.net.
Change-Id: I316d18ed8cb4dda30095929db09596f767eb2a10
2024-07-12 09:40:22 +02:00
jenkins-bot d9d71e173e Merge "Turnstile's response field uses a static name instead of IDs" 2024-07-11 08:41:05 +00:00
Translation updater bot c992c6d7f6
Localisation updates from https://translatewiki.net.
Change-Id: Ic81d4961348adf2e1b9c2709509be09738b11acb
2024-07-11 09:29:50 +02:00
Kosta Harlan 6f78a3ac57 SimpleCaptcha: Show captcha-edit message if forceShowCaptcha is set
Why:

- forceShowCaptcha is set if another extension wants to ensure that a
  CAPTCHA is presented to the user. In this case, the 'captcha-edit'
  message is more appropriate than 'captcha-edit-fail' as
  'captcha-edit-fail' implies that the user already tried and failed to
  solve the CAPTCHA.

What:

- Use 'captcha-edit' message on confirm edit hook failure if
  'shouldForceShowCaptcha' is set
  - ... but use 'captcha-edit-fail' if the user submitted an attempt.
    Note that the updated message only works in the source editor,
	not in VisualEditor or DiscussionTools

Depends-On: I5a0698d84932a474800a68dba9b76b3433b19290
Bug: T20110
Change-Id: Ie13181b78b8e2903c6cc0f0f778689bcc8b8ce2e
2024-07-10 09:50:26 +00:00
Translation updater bot 685c662918
Localisation updates from https://translatewiki.net.
Change-Id: Idc34b9110bb089df6db74b27ce3fff26d90e967f
2024-07-10 09:20:03 +02:00
Translation updater bot 2dd990a0b6
Localisation updates from https://translatewiki.net.
Change-Id: I7fed0bf5d1554027527273469647bd873ba47ee5
2024-07-09 09:42:47 +02:00
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
alex4401 92bcb7f2a2
Turnstile's response field uses a static name instead of IDs
The script was originally looking for the field by ID. This resulted in an infinite challenge loop when saving edits through the VisualEditor.

This bug stopped our [wiki.gg] rollout of Turnstile over the network last week, so upstreaming this fix in case someone else needs it.

Bug: T361098
Change-Id: I0354a33d0d1af988c8788ad2bb021c585384b038
2024-06-25 03:24:25 +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