HomeWildfire Games

Prohibit lobby nick registration with some previously not-filtered characters…


Prohibit lobby nick registration with some previously not-filtered characters between 32 and 127, in particular parentheses.

Use whitelist instead of blacklist, remove dead options and noisy unneeded gui/common/ function.
Still allow existing players with now prohibited characters to login.
This could be enforced in ejabberd too and then the now incomplete JS string can be replaced with a more general one.

Differential Revision: https://code.wildfiregames.com/D715
Refs #4671
Reviewed By: Imarok

Event Timeline

leper added inline comments.

Anyone handing out enlightenment on what makes 20 special?

elexis added inline comments.Jul 8 2017, 1:02 AM

20 was in there before (rP14098) and I agree it would make sense to cap it at some point to prevent too long names. Noone really ran into nick length issues unless trying to do something undesirable yet. It's still a magic number, but idk how we could eliminate the magic. (same for the charset)

Would be nice to limit it in ejabberd as well ( https://support.process-one.net/browse/EJAB-1037 )

leper added inline comments.Jul 8 2017, 2:53 AM

Ah, right. I'd go with just removing that random restriction (just use autocomplete like everyone else).
Also use UTF-8, everything else is even more broken, and supporting those discriminates against those few weirdos running systems using EBCDIC :P

(Or in case you don't want to autocomplete use the user interface to pinpoint the culprit (else, why are you worrying?)

elexis added inline comments.Jul 8 2017, 3:14 AM

The length argument is not only about typing the name but also about having really long blobs for no reason. Or would we want usernames that tell stories and consume half a line before the chat messgae starts? IRC is limited to 9 characters.

11:54 < echotangoecho> only allow alphanumeric, underscores IMO

If we support more than alp, then we should support all characters that look like letters.
If we support ö, ê and so forth, some people won't have those characters on the keyboard and won't be able to autocompelte those characters if the nick starts with that.
@ is the moderator symbol and should be prohibted too.
Dunno why we would need ¾, ÷, % and whatever 0xCF is in nicknames.
Also don't want lêper and léper online simultaneously. Don't see the point of having any of these characters if > 99% of the lobby users are able to live happily with alphanum+underscore.

This commit now requires audit.Aug 18 2017, 3:55 PM
This commit no longer requires audit.Aug 21 2017, 4:01 AM