beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
50 stars 47 forks source link

Add restriction to number of symbols allowed in a username. #363

Closed DeviousNull closed 1 month ago

DeviousNull commented 1 month ago

Adds an additional check at registration/rename time, which considers how many times each non-alphanumeric character appears in a requested username.

If any individual symbol appears three or more times, then the new username is rejected (and registration / renaming fails).

This patch is intended to restrict unpronounceable "meme names", such as:

These kinds of names have exceptionally poor recognizability, and if more than one player in a lobby uses these names then it becomes more difficult to 1) discuss and coordinate with them, or 2) identify misbehaving players for reporting/kickbanning.

Notably, all-symbol names with few repeats are still allowed, such as: