Page MenuHomePhabricator

AbuseFilter should short-circuit boolean conditions such as "false & something"
Closed, ResolvedPublic

Description

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]]).


Version: unspecified
Severity: minor
URL: https://www.mediawiki.org/wiki/Extension:AbuseFilter/Rules_format#Conditions

Details

Reference
bz51784

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:57 AM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz51784.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 41693 ***