Page MenuHomePhabricator

Investigate improving the tagging code
Closed, ResolvedPublic

Description

The code used to add change tags is not... pretty. The overall consequences structure is already going to be improved, but we first need to improve the 'tag' option. There are several things to improve:

  • Clean up the code to apply the abusefilter-condition-limit tag on stashed edits
  • The current action ID is unsafe, because keys are imploded with '-', which is a character allowed both in titles and usernames
  • We should investigate whether there's an alternative to using the aforementioned action ID, in favour of something more "predictable"
  • The 'tag' action should remain separate from the conds-limit tag, but they can share some code

Event Timeline

Daimona created this task.Oct 13 2020, 4:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 13 2020, 4:00 PM

Change 633777 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Add a ChangeTagger class

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

Change 633733 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Simplify code for tagging the action on cache hit if the cond limit was hit

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

Daimona claimed this task.Oct 13 2020, 4:08 PM

Change 633733 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Simplify code for tagging the action on cache hit if the cond limit was hit

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

Change 633777 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Add a ChangeTagger class

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

Daimona closed this task as Resolved.Jan 5 2021, 1:39 PM