Commit graph

3573 commits

Author SHA1 Message Date
Translation updater bot 6e1b6cb55a
Localisation updates from https://translatewiki.net.
Change-Id: I36c2a85203f2ee026e142c8b14e11b5f08356e1e
2024-08-14 09:22:25 +02:00
Translation updater bot 2a09d9fa23
Localisation updates from https://translatewiki.net.
Change-Id: I4c54a0a4c90f41c674568a1c8c5d6e96a0638d05
2024-08-13 09:50:36 +02:00
Bartosz Dziewoński 78b1492a04 Replace gettype() with get_debug_type() in exception messages
get_debug_type() does the same thing but better (spelling type names
in the same way as in type declarations, and including names of
object classes and resource types). It was added in PHP 8, but the
symfony/polyfill-php80 package provides it while we still support 7.4.

For reference:
https://www.php.net/manual/en/function.get-debug-type.php
https://www.php.net/manual/en/function.gettype.php

Change-Id: Ib07dccfe476adc203371a9082e52db56cba2e057
2024-08-12 23:05:31 +02:00
Translation updater bot 089d63c2c5
Localisation updates from https://translatewiki.net.
Change-Id: Ia0cc5fbafaf016b2ef37135b46f71f1247499dbc
2024-08-12 09:22:20 +02:00
libraryupgrader a0a9bf6cb2 build: Updating mediawiki/mediawiki-codesniffer to 44.0.0
Change-Id: Ia9625c375a20563f2f3529f84522d021fab25529
2024-08-11 05:01:38 +00:00
Reedy 9f1f29dd8d captcha.py: Simplify and sort import statements
Change-Id: Iaf968a4d69dba0550c8580b09e8029fee7b5fa94
2024-08-08 08:49:37 +00:00
Reedy 99b1478884 captcha.py: Add json output mapping
Bug: T370535
Change-Id: I0c8964b3d6ef087bd41ed11cfaa91cd83fff6275
2024-08-08 08:45:52 +00:00
Translation updater bot db5ce2dba1
Localisation updates from https://translatewiki.net.
Change-Id: Ib6d820bc1a0f24f32ce491264ddb68b1125c1ef4
2024-08-08 09:19:24 +02:00
Translation updater bot 7a994c14df
Localisation updates from https://translatewiki.net.
Change-Id: I83e589dbf819262754302178453fac1357a15298
2024-08-06 09:46:34 +02:00
Translation updater bot 1409aa3f64
Localisation updates from https://translatewiki.net.
Change-Id: I7106b11c9445d85510c8d592de2a0f13ea745078
2024-07-29 09:26:24 +02:00
jenkins-bot 46fab021f4 Merge "Use namespaced MessageSpecifier" 2024-07-28 21:30:03 +00:00
Bartosz Dziewoński 8ee87bf121 Use namespaced MessageSpecifier
Depends-On: I9ff4ff7beb098b60c92f564591937c7d789c6684
Change-Id: I45481710477a3b9bda86670e10fb2fdf75f63260
2024-07-28 21:59:31 +02:00
Translation updater bot 7a03e63f59
Localisation updates from https://translatewiki.net.
Change-Id: Ib924a0ae90832ab5e3f48b37290e0e6c5d1513c2
2024-07-26 09:44:09 +02:00
Translation updater bot 02961d1d2b
Localisation updates from https://translatewiki.net.
Change-Id: Ibfcaa078b0073d643898c42f6bfbfc88094ecb88
2024-07-25 09:18:44 +02:00
Translation updater bot 4e46e4b7d5
Localisation updates from https://translatewiki.net.
Change-Id: Ifacf58ccbf7e854ed9bcf797edbd7d00be9b3139
2024-07-24 09:22:41 +02:00
Fomafix 07646e4a65 Replace setMwGlobals by overrideConfigValue/overrideConfigValues
Change-Id: If63e84d8101f2169f684c4db822f7df907d2deec
2024-07-22 13:33:09 +00:00
Translation updater bot 90fdec4095
Localisation updates from https://translatewiki.net.
Change-Id: I6d68104c652d9178f9cf9b97d5f5f289ece0c74b
2024-07-22 09:24:14 +02:00
jenkins-bot c9bc0f036e Merge "captcha.py: Split parser.add_option() calls onto newline per parameter" 2024-07-22 05:51:33 +00:00
jenkins-bot 499fa589b2 Merge "captcha.py: Swap x0/x1 and y0/y1 values before d.arc() call" 2024-07-20 23:08:58 +00:00
Reedy 34733bf6e3 captcha.py: Split parser.add_option() calls onto newline per parameter
Change-Id: I6be4101dd8444a19ec3c3e9a600fb2da0fce8397
2024-07-19 16:52:26 +00:00
Reedy 7f02c769df FancyCaptcha: Fix return type for showImage()
Change-Id: I53875ffa1d795c267f6d9d04caa6bda4c5aba038
2024-07-19 16:02:41 +00:00
Reedy a12e5cd5b0 captcha.py: Swap x0/x1 and y0/y1 values before d.arc() call
Bug: T354099
Change-Id: I0dfd7dfcb2130d612817b4cf8bd644a7d4eb4e40
2024-07-19 14:15:42 +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