Page MenuHomePhabricator

AntiSpoof: Error in debug log and API should not be localised
Closed, ResolvedPublic

Description

For example:

2014-03-19T22:06:08.000Z
antispoof
enwiki
mw1065
ILLEGAL new account '**' Contains unassigned character "☀" (U+2600)

2014-03-19T22:05:58.000Z
antispoof
eswiki
mw1211
ILLEGAL new account '**' Contiene caracteres obsoletos o no asignados

Source code: https://github.com/wikimedia/mediawiki-extensions-AntiSpoof/blob/4cadf2af2cd49/AntiSpoofHooks.php#L64-L68


Version: unspecified
Severity: minor

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:05 AM
bzimport set Reference to bz62863.
bzimport added a subscriber: Unknown Object (MLST).

It looks like the web interface, the debug log, and the API are all dependent on a message generated/localized in AntiSpoof_Body.php (https://github.com/wikimedia/mediawiki-extensions-AntiSpoof/blob/4cadf2af2cd49116b436603f6f96908d3275928f/AntiSpoof_body.php#L309-L435). I'm not confident in my ability to fix this without doing something that feels like a horrible hack, so I'm going to unassign myself.

Noting the API in the bug title since that is also being affected by this issue:
https://en.wikipedia.org/w/api.php?action=antispoof&username=☀☀
https://es.wikipedia.org/w/api.php?action=antispoof&username=☀☀

Change 461471 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/AntiSpoof@master] Do not localize antispoof error message in the logs

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

Umherirrender subscribed.

It would work when using a Status object inside the code and giving it the language you want when converting to a string

Kept the api as is, because it already returns the language you want, when giving it a uselang=

https://es.wikipedia.org/w/api.php?action=antispoof&username=☀☀&uselang=en

Change 461471 merged by jenkins-bot:
[mediawiki/extensions/AntiSpoof@master] Do not localize antispoof error message in the logs

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