Commit graph

7781 commits

Author SHA1 Message Date
libraryupgrader a37ae552c2 build: Updating npm dependencies
* mocha: 10.2.0 → 10.8.2
  * https://github.com/advisories/GHSA-mwcw-c2x4-8c55
* nanoid: 3.3.3, 3.3.7 → 3.3.8
  * https://github.com/advisories/GHSA-mwcw-c2x4-8c55

Change-Id: Ia2f248da2da049bc23da47414554b4c26b8103d3
2024-12-11 00:21:56 +00:00
libraryupgrader 4c701c3547 build: Updating mediawiki/mediawiki-phan-config to 0.15.0
Change-Id: I57109c96f68fb274f8647ece8b9dabe57be85236
2024-12-10 01:15:00 +00:00
Daimona Eaytoy 5b321350e1 Avoid dynamic property for PHP 8.2 compatibility
Add a public method AbuseFilterChangesList that updates a map of RC IDs.

I don't particularly like this approach, but I don't like the whole
ChangesList situation either, so this should be fine for the time being.

Bug: T381836
Change-Id: I0100ed64472de67cf4559f63f2c39eb2f882e0f5
2024-12-10 02:11:21 +01:00
Translation updater bot 6381b3051a
Localisation updates from https://translatewiki.net.
Change-Id: I62f17e33ee161928fd5e6c3b9c39778b350c2042
2024-12-09 08:20:56 +01:00
jenkins-bot 979759e2dc Merge "Allow all users to see protected filters on Special:AbuseFilter" 2024-12-06 13:32:15 +00:00
STran a5dbd74017 Allow all users to see protected filters on Special:AbuseFilter
Why:
T367390 hid protected filters from users who didn't have the right to see them
because users with access to private filters also had access to search against
filters and were inadvertantly allowed to search against protected filters regardless
of whether or not they had the right to see them.

Now, in order to be consistent with how AbuseFilter displays private filters, reveal
protected filters to all users but continue to restrict access to their details.

What:
- Only hide protected filters when a user runs a search and doesn't have permission
  to access them.

Bug: T381470
Change-Id: I2acb7e066885f6da18b29876c21c5d7d199b9886
2024-12-06 00:59:46 -08:00
Translation updater bot 7e19b1f894
Localisation updates from https://translatewiki.net.
Change-Id: I04fbf4e91ce7210d5dd7d680934e77974d9e338b
2024-12-06 08:16:12 +01:00
Translation updater bot d35ee68be7
Localisation updates from https://translatewiki.net.
Change-Id: I09583a5d81af640b26f7481624e71f46c710a317
2024-12-02 08:20:52 +01:00
Nemoralis 5ec2f5db30 Add azerbaijani special page aliases
Bug: T381048
Change-Id: I151ecfb25b7ee452bd6c7dedc4b80336f15688c0
2024-11-30 03:18:06 +04:00
Translation updater bot 88d7ef972e
Localisation updates from https://translatewiki.net.
Change-Id: I7b9e43df0c6b49f7b97138fd9d5f89b00e977f18
2024-11-29 08:30:13 +01:00
jenkins-bot fa98a34c99 Merge "maintenance/SearchFilters: Allow searching by privacy level" 2024-11-26 12:31:36 +00:00
Thalia 47fb507e28 maintenance/SearchFilters: Allow searching by privacy level
Why:

* Filters should only be protected if they contain protected
  variables, or have done in the past.
* Before T377765, it was possible to protect any filter, and at
  least one filter was mistakenly protected.
* To check whether any other filters have been mistakenly
  protected, it is helpful to run a query on all databases for
  protected filters.

What:

* Add an option to maintenance/SearchFilters to allow searching
  by privacy level.

Bug: T380290
Change-Id: I40837de7c63fb8001734df80524a0bf79ff50135
2024-11-26 07:25:04 +00:00
jenkins-bot 2fa958e877 Merge "ESLint: Use ES6 and autofix" 2024-11-25 17:11:29 +00:00
Thalia 0ea7944ea3 Add documentation about running RemoveProtectedFlagFromFilter
Why:

* The maintenance script RemoveProtectedFlagFromFilter was added
  to fix a mistake where a filter was 'protected' that shouldn't
  be.
* There are certain steps that should be taken before and after
  the script is run. These are not yet documented.

What:

* Document that the script should only be run after checking that
  no data will be leaked.
* Document that a note should be left for filter editors to
  explain when and why the script was run.

Bug: T380290
Change-Id: Iffe35c87782fdd499937565f1f8da62bfd36f93d
2024-11-25 12:05:33 +00:00
Translation updater bot b5c492d8fd
Localisation updates from https://translatewiki.net.
Change-Id: Ie85cae8a8cacd964b1d6f11493d2c8c94fbeaacc
2024-11-25 08:22:05 +01:00
jenkins-bot d81c3f4c3a Merge "Migrate 'ArticleDelete' hook to 'PageDelete' to fix error display" 2024-11-24 16:51:33 +00:00
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
Ed Sanders ff3871e6d6 ESLint: Use ES6 and autofix
Change-Id: Ic58e9eaec9419f2a08bf2439a79373f3c8cd91b3
2024-11-16 21:03:59 +00: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