mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-14 17:55:00 +00:00
3b32cf00e9
With the new behavior, the number of conditions in incremented when: * Evaluating a function * Evaluating a comparison operator (== === != !== < > <= >= =) * Evaluating a keyword (in like matches contains rlike irlike regex) Previously, the number of conditions was incremented when: * Evaluating a function * Entering the comparison operator evaluation mode This resulted in a number of surprising behaviors. In particular: * '(((a == b)))' counted as 4 conditions, not 1 * 'contains_any(a, b, c)' counted as 5 conditions, not 1 * 'a == b == c' counted as 1 condition, not 2 * 'a in b + c in d + e in f' counted as 1 condition, not 3 * 'true' counted as 1 condition, not 0 It is still possible to easily cheat the count by rewriting comparisons as arithmetic operations. I believe this is meant to advise users of the complexity of their rules and not really enforce strict limits. Bug: T132190 Change-Id: I897769db4c2ceac802e3ae5d6fa8e9c9926ef246 |
||
---|---|---|
.. | ||
parserTests | ||
phpunit | ||
legacyParserTest.php |