mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-14 17:55:00 +00:00
a5b68cf46d
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 |
||
---|---|---|
.. | ||
Api | ||
ChangeTags | ||
Consequences | ||
EditBox | ||
Filter | ||
Hooks | ||
LogFormatter | ||
Pager | ||
Parser | ||
Special | ||
VariableGenerator | ||
Variables | ||
View | ||
Watcher | ||
AbuseFilter.php | ||
AbuseFilterActorMigration.php | ||
AbuseFilterChangesList.php | ||
AbuseFilterPermissionManager.php | ||
AbuseFilterPreAuthenticationProvider.php | ||
AbuseFilterServices.php | ||
AbuseLogger.php | ||
AbuseLoggerFactory.php | ||
ActionSpecifier.php | ||
BlockAutopromoteStore.php | ||
BlockedDomainFilter.php | ||
BlockedDomainStorage.php | ||
CentralDBManager.php | ||
CentralDBNotAvailableException.php | ||
EchoNotifier.php | ||
EditRevUpdater.php | ||
EditStashCache.php | ||
EmergencyCache.php | ||
FilterCompare.php | ||
FilterImporter.php | ||
FilterLookup.php | ||
FilterProfiler.php | ||
FilterRunner.php | ||
FilterRunnerFactory.php | ||
FilterStore.php | ||
FilterUser.php | ||
FilterValidator.php | ||
GlobalNameUtils.php | ||
InvalidImportDataException.php | ||
KeywordsManager.php | ||
RunnerData.php | ||
ServiceWiring.php | ||
SpecsFormatter.php | ||
TableDiffFormatterFullContext.php | ||
TextExtractor.php | ||
ThrottleFilterPresentationModel.php |