[MC-3834] Whitelist requires lower case names to work Created: 25/Nov/12 Updated: 04/Apr/16 Resolved: 17/Mar/16 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.7, Minecraft 1.5, Minecraft 1.7.4 |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Austin Brock | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 6 |
| Labels: | None | ||
| Environment: |
Windows Server |
||
| Issue Links: |
|
||||||||||||
| CHK: | |||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||
| Description |
|
From experience, it seems that entering a name in as anything other than full lowercase does not work. The connecting player cannot connect, even if the casing matches. It has to be in all lower case. I think that is something that needs fixing. |
| Comments |
| Comment by Marcono1234 [ 02/Apr/16 ] |
|
Cannot confirm for 1.9.2 |
| Comment by user-f2760 (Inactive) [ 17/Mar/16 ] |
|
No response for over a year. |
| Comment by Galaxy_2Alex [ 24/Oct/14 ] |
|
Is this still a concern in the current Minecraft version 1.8.1 Prerelease 3 / Launcher version 1.5.3 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by Richard Nicholls [ 07/Feb/14 ] |
|
I am experiencing the same(or very similar) problem as KidGoldenArms Minecraft Server 1.7.2 and 1.7.4 1) Add GermanKId1608 to server white list (/whitelist add GermanKId1608) Can he log in. NO. log file entry says he is not on the white list. Log file entry identifies him as GermanKId1608 4) reload white list (/whitelist reload) Can he log in. NO. as above 7) add a different user to white list (/whitelist add BigBopper) There would appear to be an inconsistency with the conversion of user names to lower case |
| Comment by Galaxy_2Alex [ 21/Jan/14 ] |
|
Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by KidGoldenArms [ 20/Jun/13 ] |
|
I can confirm this bug still exists in 1.5.2. How to reproduce: (1) Start server I apologize in advance if it is wrong to do this but I looked over the (deobfuscated) source code via Minecraft Coder Pack (MCP). Having done so I can describe why users such as myself and Buce above are seeing this bug. I'm going to use the MCP package/class names. These names probably don't align with the official Mojang source but hopefully it will be clear which part of the source tree is being referenced. Also, MCP decompiles the source into two directories: src/minecraft and src/minecraft_server. I'll be talking about files in the latter. How the bug happens: (2) In net.minecraft.src.DedicatedPlayerList the method isAllowedToLogin() looks like this: So when adding to the whitelist, the username string is added exactly. However, when checking the whitelist, the username string is first modified to its lowercase version. Hence the bug. Workarounds: Reloading or re-starting the server fixes the problem because in net.minecraft.src.DedicatedPlayerList the method readWhiteList() modifies the entries in white-list.txt to lowercase when it reads it in: while ((var2 = var1.readLine()) != null) { this.getWhiteListedPlayers().add(var2.trim().toLowerCase()); } var1.close(); } So in summary, isAllowedToLogin() and readWhiteList() both transform usernames to lowercase but addToWhiteList() does not. That's how the bug arises. It looks like the easiest way to fix it is to call toLowerCase() in addToWhiteList(). If that is actually implemented, care should be taken to call toLowerCase() in the method removeFromWhiteList() as well. |
| Comment by Buce [ 18/Mar/13 ] |
NVM about this, I had forgotten to re-enable whitelisting after nuking the server dir. The bug exists regardless of whether the server was upgraded from 1.4 or started fresh in 1.5. 2013-03-18 19:09:14 [INFO] Starting minecraft server version 1.5 2013-03-18 19:09:14 [INFO] Loading properties 2013-03-18 19:09:14 [WARNING] server.properties does not exist 2013-03-18 19:09:14 [INFO] Generating new properties file 2013-03-18 19:09:14 [INFO] Default game type: SURVIVAL 2013-03-18 19:09:14 [INFO] Generating keypair 2013-03-18 19:09:14 [INFO] Starting Minecraft server on *:25565 2013-03-18 19:09:14 [WARNING] Failed to load operators list: java.io.FileNotFoundException: ./ops.txt (No such file or directory) 2013-03-18 19:09:14 [WARNING] Failed to load white-list: java.io.FileNotFoundException: ./white-list.txt (No such file or directory) 2013-03-18 19:09:14 [INFO] Preparing level "world" 2013-03-18 19:09:15 [INFO] Preparing start region for level 0 2013-03-18 19:09:16 [INFO] Preparing spawn area: 8% 2013-03-18 19:09:17 [INFO] Preparing spawn area: 23% 2013-03-18 19:09:18 [INFO] Preparing spawn area: 38% 2013-03-18 19:09:19 [INFO] Preparing spawn area: 53% 2013-03-18 19:09:20 [INFO] Preparing spawn area: 69% 2013-03-18 19:09:21 [INFO] Preparing spawn area: 85% 2013-03-18 19:09:22 [INFO] Done (7.234s)! For help, type "help" or "?" 2013-03-18 19:09:23 [INFO] DMBuce[/127.0.0.1:33235] logged in with entity id 232 at (128.5, 68.0, 257.5) 2013-03-18 19:09:26 [INFO] DMBuce lost connection: disconnect.quitting 2013-03-18 19:09:29 [WARNING] Can't keep up! Did the system time change, or is the server overloaded? whitelist on 2013-03-18 19:09:30 [INFO] Turned on the whitelist 2013-03-18 19:09:38 [INFO] Disconnecting DMBuce [/127.0.0.1:33242]: You are not white-listed on this server! whitelist add DMBuce 2013-03-18 19:09:43 [INFO] Added DMBuce to the whitelist 2013-03-18 19:09:47 [INFO] Disconnecting DMBuce [/127.0.0.1:33248]: You are not white-listed on this server! whitelist add dmbuce 2013-03-18 19:09:53 [INFO] Added dmbuce to the whitelist 2013-03-18 19:09:57 [INFO] DMBuce[/127.0.0.1:33254] logged in with entity id 3124 at (128.5, 68.0, 257.5) |
| Comment by Buce [ 18/Mar/13 ] |
|
I'm getting strange behavior on this. When I take an old test server from 1.4.7, upgrade the jar to 1.5, clear white-list.txt, and start the server, the bug still exists: 2013-03-18 18:29:45 [INFO] Starting minecraft server version 1.5 2013-03-18 18:29:45 [INFO] Loading properties 2013-03-18 18:29:45 [INFO] Default game type: SURVIVAL 2013-03-18 18:29:45 [INFO] Generating keypair 2013-03-18 18:29:45 [INFO] Starting Minecraft server on *:25565 2013-03-18 18:29:45 [INFO] Preparing level "world4" 2013-03-18 18:29:45 [INFO] Preparing start region for level 0 2013-03-18 18:29:46 [INFO] Preparing spawn area: 80% 2013-03-18 18:29:46 [INFO] Done (1.246s)! For help, type "help" or "?" whitelist list 2013-03-18 18:29:56 [INFO] There are 0 (out of 2 seen) whitelisted players: 2013-03-18 18:29:56 [INFO] whitelist add DMBuce 2013-03-18 18:30:01 [INFO] Added DMBuce to the whitelist 2013-03-18 18:30:08 [INFO] Disconnecting DMBuce [/127.0.0.1:32934]: You are not white-listed on this server! whitelist add dmbuce 2013-03-18 18:30:14 [INFO] Added dmbuce to the whitelist 2013-03-18 18:30:17 [INFO] DMBuce[/127.0.0.1:32940] logged in with entity id 331 at (173.5, 68.0, 68.5) whitelist list 2013-03-18 18:30:32 [INFO] There are 2 (out of 2 seen) whitelisted players: 2013-03-18 18:30:32 [INFO] DMBuce and dmbuce If I nuke the server directory completely and start fresh, the bug goes away, so it apparently only affects servers that existed before 1.5 for some reason. |
| Comment by Tails [ 18/Mar/13 ] |
|
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by Kumasasa [ 05/Feb/13 ] |
|
Can confirm. Starting server with empty whitelist.txt and issuing whitelist add KuMaSaSa at the server console (CamelCase just for testing purposese, but makes no difference if username is spellt correctly): 2013-02-05 20:19:42 [INFO] Starting minecraft server version 13w05b 2013-02-05 20:19:42 [INFO] Loading properties 2013-02-05 20:19:42 [INFO] Default game type: SURVIVAL 2013-02-05 20:19:42 [INFO] Generating keypair 2013-02-05 20:19:43 [INFO] Starting Minecraft server on *:25565 2013-02-05 20:19:43 [INFO] Preparing level "new-world" 2013-02-05 20:19:43 [INFO] Preparing start region for level 0 2013-02-05 20:19:44 [INFO] Preparing spawn area: 75% 2013-02-05 20:19:44 [INFO] Done (1,325s)! For help, type "help" or "?" 2013-02-05 20:19:48 [INFO] /127.0.0.1:63424 lost connection 2013-02-05 20:19:50 [INFO] Disconnecting Kumasasa [/127.0.0.1:63425]: You are not white-listed on this server! 2013-02-05 20:20:03 [INFO] Added KuMaSaSa to the whitelist 2013-02-05 20:20:12 [INFO] Disconnecting Kumasasa [/127.0.0.1:63433]: You are not white-listed on this server! 2013-02-05 20:20:53 [INFO] Stopping the server Restarting, login is possible: 2013-02-05 20:20:59 [INFO] Starting minecraft server version 13w05b 2013-02-05 20:20:59 [INFO] Loading properties 2013-02-05 20:20:59 [INFO] Default game type: SURVIVAL 2013-02-05 20:20:59 [INFO] Generating keypair 2013-02-05 20:20:59 [INFO] Starting Minecraft server on *:25565 2013-02-05 20:20:59 [INFO] Preparing level "new-world" 2013-02-05 20:20:59 [INFO] Preparing start region for level 0 2013-02-05 20:21:00 [INFO] Done (1,110s)! For help, type "help" or "?" 2013-02-05 20:21:22 [INFO] Kumasasa[/127.0.0.1:63450] logged in with entity id 70 at (-841.645117534349, 62.0, -1101.0713738942434) |
| Comment by Buce [ 22/Jan/13 ] |
|
Just came here to report the same bug. Can confirm, /whitelist add YourUsername does not work as expected on 1.4.7. |
| Comment by Austin Brock [ 27/Nov/12 ] |
|
Made a video to show the bug... http://www.youtube.com/watch?v=TqJXtWKmXmA&hd=1 |
| Comment by Austin Brock [ 27/Nov/12 ] |
|
Using /whitelist add. If I use /whitelist add YourUsername, the player would not be able to join. I have to use /whitelist add yourusername. |
| Comment by [Mod] CubeTheThird [ 27/Nov/12 ] |
|
Are you manually editing the file or using a command? |
| Comment by Austin Brock [ 26/Nov/12 ] |
|
Using a vanilla server. |
| Comment by Mustek [ 26/Nov/12 ] |
|
Can't reproduce? It works fine on my server. |