https://bugzilla.wikimedia.org/show_bug.cgi?id=51784
Web browser: ---
Bug ID: 51784
Summary: AbuseFilter should short-circuit boolean conditions
such as "false & something"
Product: MediaWiki extensions
Version: unspecified
Hardware: All
URL: https://www.mediawiki.org/wiki/Extension:AbuseFilter/R
ules_format#Conditions
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: AbuseFilter
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
Currently, if I create a filter having the code
-------------------------------------
false & false & false & false & false
-------------------------------------
and then make an edit in any page, the filter's page will have a message saing
"... it consumes 5 conditions of the condition limit."
There is no reason for it to consume the last 4 conditions, because the first
one is already false.
Notice the behavior is a little better if the code is changed to
-----------------------------------------
false & ( false & false & false & false )
-----------------------------------------
because it will now consume just 2 conditions. Ideally, it should consume only
1 condition in both cases (see [[Short-circuit evaluation]]).
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l