Commit graph

7763 commits

Author SHA1 Message Date
jenkins-bot a90a5d36f4 Merge "Set "StatsdServer" in PurgeOldLogIPDataTest for maintenance script" 2024-11-22 12:13:19 +00:00
Aaron Schulz f1f2f601ef Set "StatsdServer" in PurgeOldLogIPDataTest for maintenance script
Change-Id: I55ab7244aad1054763aabdf323cf11130cc99069
2024-11-21 11:20:19 -08:00
Isabelle Hurbain-Palatin 3ad70ec182 Replace uses of deprecated ParserOutput::getText()
Bug: T293512
Change-Id: Idf94eb65e0cf915792442458abba618c5feef86b
2024-11-21 14:15:38 +01:00
Translation updater bot facba232a0
Localisation updates from https://translatewiki.net.
Change-Id: Iaf73f7c935e2ef2b8248987abf3798a727aaae6f
2024-11-21 08:20:45 +01:00
Translation updater bot 0c2a073eaf
Localisation updates from https://translatewiki.net.
Change-Id: Id62fcda36ba3e93e2883ee5a0698e9430b763d57
2024-11-20 08:24:37 +01:00
Translation updater bot 6bc32ac1f6
Localisation updates from https://translatewiki.net.
Change-Id: I3ed2b758875995d77087d219a605b79803aa4160
2024-11-19 08:17:07 +01:00
Translation updater bot 84e7f3e57a
Localisation updates from https://translatewiki.net.
Change-Id: I018c7987761b8c4dc35686b44e2fd8017101e63a
2024-11-18 08:22:07 +01:00
jenkins-bot 68433f9962 Merge "Add RemoveProtectedFlagFromFilter maintenance script" 2024-11-15 15:56:25 +00:00
jenkins-bot bf8d8243fd Merge "Improve workflow for protecting filters with protected variables" 2024-11-15 15:08:06 +00:00
jenkins-bot 7bfc37c300 Merge "AbuseFilterViewEdit: Expose status object to form builder" 2024-11-15 15:06:34 +00:00
Thalia 91456d79b2 Add RemoveProtectedFlagFromFilter maintenance script
Why:

* Protected variables were introduced to support temporary accounts
  so that temporary users could be filtered based on their IP address.
* Filters that use protected variables are protected in order to
  preserve privacy. This can't be undone.
* It is mistakenly possible to protect a filter that does not use
  protected variables (T378553). We need a mechanism to fix these
  mistakes.

What:

* Introduce a maintenance script that takes a filter ID and, if the
  filter is protected, sets it to unprotected while maintaining any
  other existing privacy levels.

Bug: T378551
Change-Id: I4dfe3970221397d5be5ea0697490d8c8e3726adf
2024-11-15 13:13:38 +00:00
jenkins-bot 1ce964ea8e Merge "Fix Phan error related to message parameters" 2024-11-15 08:17:50 +00:00
Translation updater bot 65be9c968e
Localisation updates from https://translatewiki.net.
Change-Id: I1a56b6e5ffd4fbf220595299ab5babd36d1719bb
2024-11-15 08:43:54 +01:00
Bartosz Dziewoński e5ec6ee907 Fix Phan error related to message parameters
Caused by type hints added in MediaWiki core in
I3e0df790ff9db2fa630f82408a7254a359fe61ca.

Change-Id: Ica40a9db2f9fde7c989fbdb1680b526c144dd73c
2024-11-15 00:24:45 +01:00
Thalia 8de5b4e1aa Improve workflow for protecting filters with protected variables
Why:

* Protected variables were introduced to support temporary accounts
  so that temporary users could be filtered based on their IP address.
* Filters that use protected variables are protected in order to
  preserve privacy. This can't be undone.
* The current workflow for protecting filters is to have a 'protect'
  checkbox that can be checked for any filter, even one without
  protected variables, to the discretion of the editor. This has
  led to mistakes (see T37765).

What:

* Do not show the 'protect' checkbox on the form by default. Instead,
  show it when saving a filter with protected variables, after form
  submission. The user must check it to save the filter.
* Still show the checkbox in a disabled state with a warning message
  if a filter is already protected, so that the editor can easily see
  it is protected.

Bug: T377765
Change-Id: Ie5c94ac1399860ccdca4482508dd37ff07309764
2024-11-14 18:24:27 +00:00
Thalia 6a14ea54fb AbuseFilterViewEdit: Expose status object to form builder
Why:

* For improvements to the protected filters workflow (T377765),
  a checkbox needs to be displayed conditionally on the status
  of a previously submitted form.

What:

* Pass a status object into ::buildFilterEditor, and build the
  HTML for any warnings or errors in that function, instead of
  first building the HTML and passing it.
* This also allows more than one error and/or warning to be
  shown if present, though this may not happen in practice yet.

Change-Id: I37da49711e7fc192856f013cd931c05379f8e8c6
2024-11-14 18:23:25 +00:00
jenkins-bot 5c5d64fcb9 Merge "SpecialAbuseFilterTest: Remove unused trait" 2024-11-14 15:03:29 +00:00
Translation updater bot b4b20536c0
Localisation updates from https://translatewiki.net.
Change-Id: Iba4ef18ed56551093b2f40c22506a07338a6b329
2024-11-14 08:18:40 +01:00
Thalia 2cb1ad0f58 SpecialAbuseFilterTest: Remove unused trait
Remove the use statement for MockAuthorityTrait, which is unused.
We can't use it because SpecialAbuseFilter checks permissions on
the user, not the authority.

Change-Id: I2baca5753dd9e21aa90b6856c5850d1100eda4d5
2024-11-13 18:57:18 +00:00
Translation updater bot 1fcf9adb92
Localisation updates from https://translatewiki.net.
Change-Id: Id64d97537e9269d7394aac8d2502e64498f86fd7
2024-11-13 08:23:13 +01:00
Yongmin Hong 6ea1914471
AbuseFilter.alias.php: Sync Korean translation with English text
Added `BlockedExternalDomains` translation.

Signed-off-by: Yongmin Hong <revi@omglol.email>
Change-Id: Idf34b37fe12fa0996a0fa15ef6a81596f64c8847
2024-11-12 21:54:19 +09:00
Translation updater bot 098d3d3f08
Localisation updates from https://translatewiki.net.
Change-Id: If3c4b57a6caada4eda685eb1c58416ec4d1842fd
2024-11-12 08:16:55 +01:00
Dreamy Jazz 774f4f02ef Create protected variable access logs POSTSEND
Why:
* The ProtectedVarsAccessLogger::logViewProtectedVariableValue
  method creates a debounced log entry for accessing protected
  variable values.
* This log can be created when a user calls the 'abuselog' query
  API. This API query is made using a GET request.
* Because the ProtectedVarsAccessLogger creates the log
  when it is called, the TransactionProfiler raises a warning
  about writing to the primary DB on a GET request.
* We should address this warning by creating the log entry on
  POSTSEND, in a similar way to how the CheckUser extension
  creates CheckUser log entries.

What:
* Wrap the call to ProtectedVarsAccessLogger::log in
  ::logViewProtectedVariableValue with a DeferredUpdate callback
  that is run POSTSEND.
** As part of this, the expectations that the code only uses the
   replica DBs are silenced inside the DeferredUpdate as the
   PostSend-GET expectations do not usually allow for writes.
   The only other method would to be create the log via a job,
   but we want the log creation to occur quickly and reliably.

Bug: T379083
Change-Id: If14e65b27b0bdd4fd0b99319024ffa281bf44656
2024-11-11 14:33:47 +00:00
Translation updater bot 0dd6dd636c
Localisation updates from https://translatewiki.net.
Change-Id: I0b35821374707c243ba0fed63b325057c8011636
2024-11-11 08:21:20 +01:00
Translation updater bot f8ce2d2d64
Localisation updates from https://translatewiki.net.
Change-Id: I9f63260aa327c6368c65103c632e6224e0862b8a
2024-11-08 08:27:35 +01:00
Translation updater bot 40ba330c5d
Localisation updates from https://translatewiki.net.
Change-Id: I5e53d516720263d8a835a72e7a4ff303f67ca6a0
2024-11-07 08:18:03 +01:00
Translation updater bot 10fa41a399
Localisation updates from https://translatewiki.net.
Change-Id: I4c019481388710e9963f07fc45acc37efd1adeb7
2024-11-06 08:20:45 +01:00
Translation updater bot 4bfeb78295
Localisation updates from https://translatewiki.net.
Change-Id: I7be45c75006819f18f63d4dcd287b95c609fc5fb
2024-11-05 08:31:16 +01:00
Translation updater bot 0d9f266ff7
Localisation updates from https://translatewiki.net.
Change-Id: I258d66937a819baaadea43289f0e8aeb0fafa044
2024-11-04 08:20:19 +01:00
Translation updater bot 4616b729d9
Localisation updates from https://translatewiki.net.
Change-Id: Ibf7f234b2d63e91fe843f78196bdb20c169c13cf
2024-11-01 08:34:30 +01:00
libraryupgrader 43396baed4 build: Updating mediawiki/mediawiki-codesniffer to 45.0.0
Change-Id: Ica1fbbe5061fad52da51ca793afde3b92392f0ca
2024-11-01 01:02:33 +00:00
Translation updater bot 881c86792f
Localisation updates from https://translatewiki.net.
Change-Id: I511583a5f2cc84105b6d5057de8b54861d49301d
2024-10-31 08:15:08 +01:00
Translation updater bot 61c0d9acc0
Localisation updates from https://translatewiki.net.
Change-Id: I35734a4d0a78eabb82fc826d9ff3d645eec8b5c3
2024-10-30 08:21:28 +01:00
jenkins-bot 48085d0a7a Merge "Clean up an unused OOUI infuse" 2024-10-29 13:04:13 +00:00
jenkins-bot 9b5261a678 Merge "Add code comments to help find dynamically-generated IDs in the codebase" 2024-10-29 13:02:23 +00:00
jenkins-bot 11e4ded1d0 Merge "Update copy for protected variable use on filters" 2024-10-29 11:10:54 +00:00
Translation updater bot 52ad3b108e
Localisation updates from https://translatewiki.net.
Change-Id: Iaf9ab1269d3fb4e4cd9106a09464f1dd45e3a98a
2024-10-29 08:38:38 +01:00
Anne Haunime 2f4ca44adf Add code comments to help find dynamically-generated IDs in the codebase
Bug: T378319
Change-Id: Id5dd2dc1a979423f2ec4e0f091fb854b2ff185cb
2024-10-29 03:10:27 +00:00
jenkins-bot 5a930d59d3 Merge "Simplify code by replacing isset() with falsy check" 2024-10-28 17:02:32 +00:00
STran c73e6f8cd5 Update copy for protected variable use on filters
- Clarify that to use protected variables in a filter, they must be
  enabled and will cause the filter to be considered protected.

Bug: T377553
Change-Id: I69b879f12cfe76e6fff0080dd93024d6bd29159d
2024-10-28 06:53:38 -07:00
Translation updater bot 0a62ce6587
Localisation updates from https://translatewiki.net.
Change-Id: Ia38b27a77d0a44b87ad3553f305d48fe6e636160
2024-10-28 08:20:36 +01:00
Anne Haunime 5c788d3da1 Clean up an unused OOUI infuse
Bug: T378319
Change-Id: Ibec17d5371b2b644db91186835905a5181fd50b7
2024-10-28 05:54:31 +00:00
Umherirrender 6252afcac7 Simplify code by replacing isset() with falsy check
Conditional set of variable is not easy to read.
Instead set the variable to null before try/catch
Reported by a new phan plugin (2efea9f989)
This bypass a false positive from phan (T378271)

Change-Id: I037efe8465747b8c915405f38546fc1ea4405a03
2024-10-27 13:20:18 +01:00
Umherirrender a02fe0a2dd Use a local variable for hitcount in AbuseFilterViewEdit
Assist static code analyzer that null is not passed to
Message::numParams

Change-Id: Ic0369493b274de3379067745573e1f8baed56dcb
2024-10-26 21:41:16 +02:00
Andre Klapper 63de22357d Use explicit nullable type on parameter arguments (for PHP 8.4)
Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.

Bug: T376276
Change-Id: I303342cf1a002d5f0afc77ce147ce9453ea5282e
2024-10-26 14:38:46 +02:00
Umherirrender 6757ee9d32 Use type-declaration on api module constructor
Parent class constructor gets type-declaration in 1145328459
Remove simple doc-blocks without further information

Change-Id: I5d2179af0c7b826ca48df239152412205702cd77
2024-10-25 19:02:04 +02:00
Translation updater bot 43f8580bdf
Localisation updates from https://translatewiki.net.
Change-Id: I6ecb104597db0840c2740e4e8b983d2b8743fc57
2024-10-25 09:44:02 +02:00
Bartosz Dziewoński 3b2b1c4fee AbuseLogPager: Fix passing false as message parameter
Bug: T377917
Change-Id: I1e4eee10d7ee0cac777f89dd85f2e8bd364b8475
2024-10-23 17:53:07 +02:00
Translation updater bot 46ab46195c
Localisation updates from https://translatewiki.net.
Change-Id: I5a189932343051b4429b044b44419239de081f2f
2024-10-22 09:28:39 +02:00
jenkins-bot ad516227f4 Merge "Protected variable logs: fallback to accountname if user_name is not set" 2024-10-21 20:18:15 +00:00