Page MenuHomePhabricator

AbuseFilterParser::ccnorm() should not do a homemade reimplementation of AntiSpoof::equivString()
Closed, ResolvedPublic

Description

Instead of manually checking file paths, loading and interpreting an equivset, it should just call AntiSpoof's equivalent function. The problem here is that AntiSpoof itself does a home-made reimplementation of strtr() - that needs to be fixed first. Bonus points for fixing generateEquivset.php to not generate replacement pairs with empty keys which currently requires a workaround.

Event Timeline

MaxSem created this task.Aug 8 2017, 12:14 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 8 2017, 12:14 AM
MaxSem assigned this task to dmaza.Aug 8 2017, 12:14 AM

Change 371204 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/AntiSpoof@master] Add normalizeString method

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

Change 371205 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/AbuseFilter@master] Remove manual implementation of AntiSpoof::equivString

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

Change 371204 merged by jenkins-bot:
[mediawiki/extensions/AntiSpoof@master] Remove homemade implementation of strtr

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

Change 371205 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Remove manual implementation of AntiSpoof::equivString

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

Would it be better to split off the method into a standalone library so this extension does not depend on the other only for this method (i.e. they can both depend on the standalone library)?

@dmaza I'm moving this back a step since it hasn't been merged yet.

dmaza added a comment.Aug 16 2017, 4:20 PM

@dbarratt which one is not merged?

@dmaza whoops... read that wrong.

TBolliger closed this task as Resolved.Aug 17 2017, 5:51 PM