Page MenuHomePhabricator

When using + append operator, rlike checks each individual string instead of the combined one
Closed, ResolvedPublic


See e.g. [[q:it:Speciale:AbuseFilter/examine/310666]] (feel free to temporarily add yourself to local sysop group, if you want) i.e. :
(new_wikitext rlike ("===? *Senza fonte *===?[^=]+" + added_lines))
gives false while it's expected to give true (and it seems to do so if added_lines is one line only, e.g. here: : if this is the correct behaviour change bug summary), but if you remove parenthesis it always gives true, even if you check
(new_wikitext rlike "nonexistentstring" + "===? *Senza fonte *===?[^=]+")
(new_wikitext rlike "===? *Senza fonte *===?[^=]+" + "nonexistentstring")

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:52 PM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz22220.
bzimport added a subscriber: Unknown Object (MLST).
Daimona closed this task as Resolved.Mar 13 2018, 12:30 PM
Daimona claimed this task.
Daimona added a subscriber: Daimona.

This works as expected right now: added_lines irlike "foobar" is equal to added_lines irlike ( "foo" + "bar" ). However, added_lines irlike "foo" + "bar" is not the way to write this since, if I'm right, operations are associative on the left. Finally, if the problem was strictly related to added_lines itself, T52107 would be the right place.