Page MenuHomePhabricator

Some of AntiSpoof's error messages need love
Closed, ResolvedPublic5 Estimated Story Points

Description

As promised in T94958, I'm filing a ticket about some of the MediaWiki extension AntiSpoof's error messages. "antispoof-tooshort" is currently: "Canonicalized name too short". This is really opaque and unhelpful. Some of the other messages aren't really much better (e.g., "Contains unassigned character $1" and "Contains incompatible mixed scripts").

We should audit these error message and either remove them from user interface exposure or make them clearer. Basically these error messages currently read like debug messages, which is fine, as long as we're not exposing those messages to users directly. We need to either only expose these messages internally or we need to rewrite them in plainer language. "Mixed scripts", "canonicalized", and "unassigned character" are difficult for me to understand and I'm a native English speaker who's very moderately intelligent!


To do

  • Propose new language on the error messages
  • Get input/approval from others about the proposed new language
  • Make changes, merge, & release

Messages

Usage

The username "FooBar" is not allowed to prevent confusing or spoofed usernames: ERROR MESSAGE HERE Please choose another username.

Error Messages

antispoof-badtype

  • Current: Bad data type
  • Update to: Usernames can only contain unicode characters.

antispoof-empty

  • Current: Empty string
  • Update to: No username was provided.

antispoof-blacklisted

  • Current: Contains blacklisted character $1
  • Update to: Usernames cannot contain the character "$1".

antispoof-combining

  • Current: Begins with combining mark $1
  • Update to: Usernames cannot begin with "$1".

antispoof-unassigned

  • Current: Contains unassigned character $1
  • Update to: Usernames cannot contain the character "$1".

antispoof-deprecated

  • Current: Contains deprecated character $1
  • Update to: Usernames cannot contain the character "$1".

antispoof-noletters

  • Current: Does not contain any letters
  • Update to: Usernames must contain one or more letters.

antispoof-mixedscripts

  • Current: Contains incompatible mixed scripts
  • Update to:

antispoof-tooshort

  • Current: Normalized name too short
  • Update to: Your provided username is too short.

Event Timeline

MZMcBride raised the priority of this task from to Needs Triage.
MZMcBride updated the task description. (Show Details)
MZMcBride added subscribers: MZMcBride, Nemo_bis.

Does AntiSpoof internally have knowledge of what subcase caused a failure? If not, this will need to be fixed together with the feature request where I asked to use Unicode tools for the purpose.

Change 329197 had a related patch set uploaded (by DatGuy):
AntiSpoof: Simplify word in en and en-gb.

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

Change 329197 merged by jenkins-bot:
Multiple i18n changes

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

TBolliger set the point value for this task to 5.Sep 26 2017, 6:28 PM

After a month, no edits but my own. Etherpad ain't working, let's use this ticket directly.

There are two that I don't know how to word properly without being too technical, which makes me question the purpose of these error messages. Should we construct their language for new users or for troubleshooting? If the answer is both then I would suggest we reconstruct all these messages like such:

The username "FooBar" is not allowed to prevent confusing or spoofed usernames because REASON. Please choose another username. (Error code 1)

Let's not use error codes - there are so many things wrong with them I don't know where to start. However, it would be beneficial for troubleshooting purposes if all the messages were different in some way.

Some suggestions:

  • I'd love to see antispoof-name-illegal altered to To prevent confusion, the username \"$1\" cannot be used. $2 Please choose another username.
  • I'm not sure what would trigger antispoof-badtype, but in any case, Unicode needs a capital U.
  • To distinguish blacklisted/unassigned/deprecated, could we do something like Usernames cannot contain the character "$1", because it is blacklisted/not assigned/deprecated. or Usernames cannot contain blacklisted/unassigned/deprecated characters such as "$1".? So long as the user understands that the actual character in question cannot be contained in a username, one word of technical jargon shouldn't be a problem. As I said, the messages need to be distinguished for troubleshooting purposes.
  • For mixedscripts we could have Usernames cannot contain characters from different scripts or Usernames cannot contain a mix of different scripts, possibly using the word "writing systems" instead of "scripts" to avoid jargon.
  • Because of the special nature of the antispoof-combining message I think it should finish with <code>$1</code>, or maybe even <code> $1 </code>, and no dot. Combining characters are very tricky to display correctly on their own.
Aklapper changed the task status from Stalled to Open.May 12 2020, 8:55 PM

Nothing blocked here hence resetting task status

Note: Idea for potential format. Individual constraints on error messages that are too specific need to either be changed to the appropriate bounds or datatype's when someone here can direct me to some sort of deocumentation on what triggers the error messages to be generated else the error messages I have presented need to be less specific if no such documentation can be found.

Messages
Usage
The username "FooBar" is not allowed to prevent confusing or spoofed usernames: ERROR MESSAGE HERE Please choose another username.
Update to: The username you have requested is unavailable. Please choose another username.
**I think giving more information than that here will actually encourage those trying to spoof.

Error Messages
antispoof-badtype
Current: Bad data type
Update to: Usernames can only contain letters (a-z), numbers (0-9), and periods (.) .
**I think actually listing the datatypes as above might help; above is just an example; need to find documentation on actual datatypes on this.

antispoof-empty
Current: Empty string
Update to: You have not provided a username. Please provide a username between 1 to 40 characters.
**Listing the lower and upper limit of characters might be helpful; above is just an example; need to find documentation on actual upper and lower limit on this. So far I have found the lower limit to be 1 and the upper limit to be 40 characters

antispoof-blacklisted
Current: Contains blacklisted character $1
Update to: Usernames cannot contain the character "$1". They can only contain letters (a-z), numbers (0-9), and periods (.).
**I think actually listing the datatypes as above might help; above is just an example; need to find documentation on actual datatypes on this.

antispoof-combining
Current: Begins with combining mark $1
Update to: Usernames cannot begin with "$1". They can only can begin with non-alphanumeric characters except periods (.).
**I think actually listing the datatypes as above might help; above is just an example; need to find documentation on actual datatypes on this.

antispoof-unassigned
Current: Contains unassigned character $1
Update to: Usernames cannot contain the character "$1". They can only contain letters (a-z), numbers (0-9), and periods (.).
**I think actually listing the datatypes as above might help; above is just an example; need to find documentation on actual datatypes on this.

antispoof-deprecated
Current: Contains deprecated character $1
Update to: Usernames cannot contain the character "$1". They can only contain letters (a-z), numbers (0-9), and periods (.).
**I think actually listing the datatypes as above might help; above is just an example; need to find documentation on actual datatypes on this.

antispoof-noletters
Current: Does not contain any letters
Update to: Usernames must contain one or more letters (a-z).
**I think actually listing the kinds of letters accepted as above might help; above is just an example; need to find documentation on actual letters accepted on this.

antispoof-mixedscripts
Current: Contains incompatible mixed scripts.
Update to: Username contains incompatible mixed scripts. They can only contain letters (a-z), numbers (0-9), and periods (.).
**I think actually listing the datatypes as above might help; above is just an example; need to find documentation on actual datatypes on this.

antispoof-tooshort
Current: Normalized name too short
Update to: Your provided username is too short. Please provide a username between 1 to 40 characters.
**Listing the lower and upper limit of characters might be helpful; above is just an example; need to find documentation on actual upper and lower limit on this. So far I have found the lower limit to be 1 and the upper limit to be 40 characters

Hi @missaishagurung, welcome to Wikimedia Phabricator!

Update to: Usernames must contain one or more letters (a-z).

Did you check yourself that only ASCII/Latin alphabet letters are possible, and that I cannot use و or ש or ঝ or Щ?

Update to: Your provided username is too short. Please provide a username between 6 to 30 characters.

Where do the numbers "6" and "30" come from? Does MediaWiki define that somewhere and is that hard-coded and not configurable?

Hi @Aklapper thanks!
For antispoof-noletters I assumed this was for the English MediaWiki and also the translated versions of the page AntiSpoof Documentation had the John Doe example and did not allow mixed scripts but antispoof-tooshort I had mentioned that listing the lower and upper limit of characters might be helpful and the above is just an example of how we could possibly phrase that. I guess there is some additional info on Account creation user experience/Usernames as that the maximum limit of characters is 40 but no lower limit (it seems it is 1 from the code) .

I feel providing more information on what is allowed is more user friendly than just saying what is not allowed. I haven't had the chance to look into the code in much detail yet but if there is any other documentation on under what constrainsts are the individual error messages produced that you or anyone on here could guide me to I'd be glad to go through them and work on including them in the error messages in the above format.

As much as I like being more user friendly, I'd also say that any (potentially wrong) assumptions about configuration settings or languages must not be included. :)

Change 757126 had a related patch set uploaded (by EpicPupper; author: EpicPupper):

[mediawiki/extensions/AntiSpoof@master] AntiSpoof: Clarify error messages

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

Opened a patch. Overview of the changes:

  • name-illegal: TTO's suggestion
  • badtype: MZMcBride's suggestion + TTO's suggested capital U
  • empty: MZMcBride's suggestion
  • prohibited (previously blacklisted): TTO's suggestion
  • combining: TTO's suggestion
  • unassigned: TTO's suggestion
  • deprecated: TTO's suggestion
  • noletters: MZMcBride's suggestion tweaked a bit by me, letters --> characters as not all languages use letters
  • mixedscripts: TTO's suggestion
  • tooshort: MZMcBride's suggestion

Hopefully I covered them all! If I missed something, please let me know and I'll fix it. The Gerrit patch link is above (thanks gerritbot!)

Change 757126 merged by jenkins-bot:

[mediawiki/extensions/AntiSpoof@master] AntiSpoof: Clarify error messages

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

Frostly claimed this task.

Done!