PocketMine / PocketMine-MP

Legacy PocketMine-MP repository. Head to https://github.com/pmmp for up to date software.
https://www.pocketmine.net/
GNU Lesser General Public License v3.0
1.26k stars 660 forks source link

login (and whitelisting) fail on usernames with spaces in them #4364

Closed RangerRick closed 6 years ago

RangerRick commented 6 years ago

Issue description

I set up the latest 1.7dev and while it loads fine, I had a number of issues trying to make a username with a space in it work:

  1. I was unable to log in because I had MineCraftPE connected to my Xbox Live gamertag, which has a space in it (Racoon Fink). Attempting to log in would give me the error: [21:19:34] [Server thread/INFO]: Racoon Fink[/XXX.XXX.XXX.XXX:23478] logged out due to Invalid name!
  2. I tried logging out of my MS account and tried connecting to the server again with the same username and it still failed with the same error.
  3. Thinking maybe it was a whitelist issue, I tried adding the user to the whitelist, but it would not accept a username with a space in it, whether or not I quoted it.
whitelist add Racoon Fink
[21:21:30] [Server thread/INFO]: Usage: /whitelist <on|off|list|add|remove|reload>
whitelist add "Racoon Fink"
[21:21:37] [Server thread/INFO]: Usage: /whitelist <on|off|list|add|remove|reload>

(Once I changed my username to one without spaces in it, I was able to connect to the server successfully.)

Steps to reproduce the issue

  1. set your name to contain a space in your MineCraftPE profile
  2. attempt to log in

OS and versions

joech4n commented 6 years ago

+1

robske110 commented 6 years ago

Usernames with spaces are not (yet) allowed in PM. PM names must follow the naming convention of MCPC. Microsoft shitbox allows spaces, and therfore this was implemented into MCPE too.

dktapps commented 6 years ago

This has been implemented in newer versions of PMMP PocketMine-MP. Versions supporting Minecraft Bedrock 1.2+ support this by using quotes around "names with spaces".