Page MenuHomePhabricator

Breaking change in AbuseFilter's "like" operator
Closed, ResolvedPublic

Description

The "like" operator in AbuseFilter started behaving differently, after Bug 66930 was resolved in https://gerrit.wikimedia.org/r/#/c/141483/ .

Currently:
"a-b" like "a-b"
=> false

Previously:
"a-b" like "a-b"
=> 1

I believe this was an unexpected side effect. At least the change was not documented anywhere to prevent breakage of existing filters.


Version: unspecified
Severity: normal

Details

Reference
bz67670

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:26 AM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz67670.

66935(In reply to Yusuke Matsubara from comment #0)

The "like" operator in AbuseFilter started behaving differently, after Bug
66930 was resolved in https://gerrit.wikimedia.org/r/#/c/141483/ .

Bug 66935, it seems.

Probably Ori and Aaron to comment here, as that patch seems to have created this problem?

Change 145697 had a related patch set uploaded by Ori.livneh:
Fix double escaping in AFPData::keywordLike()

https://gerrit.wikimedia.org/r/145697

Sorry for not including this first, but " " seems to need the same fix.

"a b" like "a b" => false

Change 145697 merged by jenkins-bot:
Fix double escaping in AFPData::keywordLike()

https://gerrit.wikimedia.org/r/145697