mediawiki-extensions-AbuseF.../includes
Dreamy Jazz a5b68cf46d Don't attempt to steal or create the FilterUser in CheckUserHandler
Why:
* When CheckUser asks the AbuseFilter extension for modifications
  to rows inserted into the CheckUser tables, the AbuseFilter
  extension attempts to get the Filter user via User::newSystemUser
* User::newSystemUser can deadlock if multiple requests to create
  the system user are being made at once.
* The CheckUserHander does not need to create the abuse filter system
  and instead only needs to know if a given $user is the equal to
  the FilterUser.
* As such the FilterUser service needs to provide a way to check if
  a given $user is equal without creating the FilterUser.

What:
* Add FilterUser::isUserSameAs which returns a boolean value
  indicating whether the Abuse Filter system user is the equal
  to a given UserIdentity in the same way that UserIdentity::equals
  is implemented.
* Refactor ::getUser to get the username for the filter user in
  a separate method, so that the ::isUserSameAs method can also
  use this method. Name this new method ::getFilterUserName.
* Add a test for the FilterUser service to ensure consistent test
  coverage
* Convert the @covers and @coversDefaultClass annotations to be
  a @covers for the class. This is because PHPUnit recommends this in
  https://docs.phpunit.de/en/9.6/annotations.html#appendixes-annotations-covers-tables-annotations

Bug: T356275
Bug: T346967
Change-Id: I8a101781bb47612deabb0f2a06a398ac13e860e6
2024-01-31 19:32:52 +00:00
..
Api Use namespaced classes 2023-12-10 23:03:12 +01:00
ChangeTags Use namespaced classes 2023-12-10 23:03:12 +01:00
Consequences Use namespaced classes 2023-12-10 23:03:12 +01:00
EditBox Use namespaced classes 2023-12-10 23:03:12 +01:00
Filter Replace BadMethodCallException with LogicException 2023-11-16 19:10:50 +00:00
Hooks Don't attempt to steal or create the FilterUser in CheckUserHandler 2024-01-31 19:32:52 +00:00
LogFormatter Use namespaced classes 2023-12-10 23:03:12 +01:00
Pager Fix "PHP Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated" 2023-12-15 23:01:09 +00:00
Parser Use namespaced classes 2023-12-10 23:03:12 +01:00
Special Blocked domains: Add support for "added by" field 2023-12-27 04:37:42 +01:00
VariableGenerator Use namespaced classes 2023-12-10 23:03:12 +01:00
Variables Use namespaced classes 2023-12-10 23:03:12 +01:00
View Remove indirect calls to IDBAccessObject::READ_* constants 2024-01-26 09:25:35 -05:00
Watcher Use namespaced classes 2023-12-10 23:03:12 +01:00
AbuseFilter.php Use actor table in AbuseFilter 2023-03-22 14:01:29 +01:00
AbuseFilterActorMigration.php Use namespaced MediaWiki\User\ActorMigrationBase 2023-08-20 01:08:09 +02:00
AbuseFilterChangesList.php Use namespaced classes 2023-12-10 23:03:12 +01:00
AbuseFilterPermissionManager.php AbuseFilterPermissionManager: Add sitewide block check 2022-10-21 17:34:01 +00:00
AbuseFilterPreAuthenticationProvider.php Use namespaced classes 2023-12-10 23:03:12 +01:00
AbuseFilterServices.php BlockedDomains: Move filtering logic to a dedicated class 2023-08-06 16:27:23 +02:00
AbuseLogger.php Use namespaced classes 2023-12-10 23:03:12 +01:00
AbuseLoggerFactory.php Use namespaced classes 2023-12-10 23:03:12 +01:00
ActionSpecifier.php Use ActionSpecifier to load the IP address 2022-12-17 22:52:24 +01:00
BlockAutopromoteStore.php Use namespaced classes 2023-12-10 23:03:12 +01:00
BlockedDomainFilter.php Use namespaced classes 2023-12-10 23:03:12 +01:00
BlockedDomainStorage.php Remove indirect calls to IDBAccessObject::READ_* constants 2024-01-26 09:25:35 -05:00
CentralDBManager.php Fix various typos and documentation issues 2023-09-04 12:55:17 +02:00
CentralDBNotAvailableException.php
EchoNotifier.php Use namespaced Title 2023-08-19 19:49:36 +02:00
EditRevUpdater.php Replace deprecated database object access methods 2023-03-08 16:50:56 +01:00
EditStashCache.php Refactor ParserStatus 2021-09-17 11:25:54 +00:00
EmergencyCache.php
FilterCompare.php
FilterImporter.php maintenance,includes: Clean up file headers 2022-09-29 17:56:49 +01:00
FilterLookup.php Remove indirect calls to IDBAccessObject::READ_* constants 2024-01-26 09:25:35 -05:00
FilterProfiler.php Use namespaced Title 2023-08-19 19:49:36 +02:00
FilterRunner.php Use namespaced classes 2023-12-10 23:03:12 +01:00
FilterRunnerFactory.php Use namespaced classes 2023-12-10 23:03:12 +01:00
FilterStore.php Use namespaced classes 2023-12-10 23:03:12 +01:00
FilterUser.php Don't attempt to steal or create the FilterUser in CheckUserHandler 2024-01-31 19:32:52 +00:00
FilterValidator.php Use namespaced classes 2023-12-10 23:03:12 +01:00
GlobalNameUtils.php
InvalidImportDataException.php
KeywordsManager.php Document more generated messages 2023-11-08 16:34:08 +00:00
RunnerData.php Refactor ParserStatus 2021-09-17 11:25:54 +00:00
ServiceWiring.php Don't attempt to steal or create the FilterUser in CheckUserHandler 2024-01-31 19:32:52 +00:00
SpecsFormatter.php Document more generated messages 2023-11-08 16:34:08 +00:00
TableDiffFormatterFullContext.php Use the new Wikimedia\Diff namespace 2023-06-29 11:56:13 +10:00
TextExtractor.php Remove bits of unused code across the codebase 2023-06-14 19:41:00 +00:00
ThrottleFilterPresentationModel.php Improve wording for throttled filter warnings 2022-02-22 11:10:19 +00:00