uncovery / uncovery_me

Full source of the uncovery.me minecraft server
GNU General Public License v3.0
12 stars 3 forks source link

Prevent special chars in /home names #249

Closed uncovery closed 7 years ago

uncovery commented 8 years ago

/home should filter the input to not contain any non-alphabet chars.

ETcodehome commented 7 years ago

what about numbers? Are we trying to remove ascii values only or just limit it to a-z and A-Z

uncovery commented 7 years ago

numbers, underscore and dashes should be fine. the issue is when people use quotes, spaces or unicode etc.

ETcodehome commented 7 years ago

uncovery:

Sorry, but I feel it's not really user-friendly to change the name and use that. Frankly I'd rather reject the invalid names and tell the user that they should not use certain characters. Would you be able to do that instead?

Will have to rewrite a bit of code to do this. not sure that sanitising via reg expressions will give me a return value either. Might be able to compare a sanitised string to the raw input and unless they match fail it?