mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-12 08:49:28 +00:00
74569e20a7
With I5e3764dbec8ac21f20c460181ae78ed73eca92f6 I introduced a function to check that two blocks with different wordings refer to the same duration. While that functions works good 99.9% of the time, there's a highly unlikely but actual problem: if one of the operand is parsed at time x and the other at time x+1 (in seconds, and this may happen even if it gets parsed 1 ms later), the 2 durations will be considered different and this may be annoying. With this patch I introduce another tiny function which uses strtotime to parse a duration, but uses the second parameter (=0) to avoid relativeness to the current time. Again, this isn't likely to occurr, but since the fix is straightforward we'd better do it. Also, now global durations aren't parsed at every iteration (previously they were due to the same problem, amplified by time distance between the first and the last iteration). Change-Id: I11a078f298aaed9631d7f422c6b9b722d28e73cc |
||
---|---|---|
.. | ||
api | ||
pagers | ||
parser | ||
special | ||
Views | ||
AbuseFilter.php | ||
AbuseFilterChangesList.php | ||
AbuseFilterHooks.php | ||
AbuseFilterModifyLogFormatter.php | ||
AbuseFilterPreAuthenticationProvider.php | ||
AbuseFilterVariableHolder.php | ||
AbuseLogHitFormatter.php | ||
AFComputedVariable.php | ||
TableDiffFormatterFullContext.php |