mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
2de5fce177
Introduce shorter methods, one for each steps, so that it's easier to understand what the code is doing and figure out if the order makes sense. The ConsequencesExecutor test is now a proper unit test. Also simplify AbuseFilterConsequencesTest, removing old/wrong logic and fixing two expected values that were actually wrong (but worked because of the aforementioned wrong logic). The only functional changes should be: - We pick the longest block *after* checking the ConsequenceDisabler consequences, so e.g. if a filter has a long block + warn and another filter has a shorter block, we still keep the second one if warn will disable the block. - Remove disallow in presence of dangerous actions after checking ConsequenceDisabler's and deduplicating blocks. Otherwise we may remove disallow for filters where block (etc.) doesn't end up being disabled. We may also want to consider not removing disallow at all, now that messages are customizable. Bug: T303059 Change-Id: If00adbf2056758222eaaea70b16d3b4f89502c20 |
||
---|---|---|
.. | ||
integration | ||
unit | ||
AbuseFilterBlockTest.php | ||
AbuseFilterConsequencesTest.php | ||
AbuseFilterCreateAccountTestTrait.php | ||
AbuseFilterFilterUserTest.php | ||
AbuseFilterRowsAndFiltersTestTrait.php | ||
AbuseFilterSaveTest.php | ||
AbuseFilterUploadTestTrait.php | ||
ConsequenceGetMessageTestTrait.php | ||
DegroupTest.php | ||
LazyVariableComputerDBTest.php | ||
RangeBlockTest.php | ||
RCVariableGeneratorTest.php | ||
SchemaChangesHandlerTest.php | ||
UpdateHitCountWatcherTest.php |