[MC-1433] UDP Query Protocol does not properly unpack/pack integers, session IDs are not returned correctly Created: 31/Oct/12 Updated: 09/Feb/13 Resolved: 05/Feb/13 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.2 |
| Fix Version/s: | Minecraft 1.4.7 |
| Type: | Bug | ||
| Reporter: | Blake Beaupain | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | query, server | ||
| Environment: |
All environments. |
||
| Confirmation Status: | Unconfirmed |
| Description |
|
The query protocol in the Minecraft server has an I/O bug that is dependent upon the default charset used in the host system. Currently, integers are unpacked via code equivalent to the following: http://pastebin.com/raw.php?i=pNRJgzyB This is unreliable, and will not properly unpack the integer into bytes. As a result, the Minecraft server will not always send back the proper session ID. Session IDs are sent back properly for the first 128 numbers on most charsets, but after that point the bug occurs. We discovered this bug while writing software that polls information from over 20,000 Minecraft servers simultaneously for our website, Minestatus. It sure caused us quite a headache! We have implemented our own workaround that allows us to properly update all of our servers by generating session IDs that will come back correctly, but it was not simple. We recommend the following methods be used instead to unpack/pack integers/bytes: http://pastebin.com/raw.php?i=eeX59pHz These two methods will guarantee that all session IDs will be unpacked and packed properly. |
| Comments |
| Comment by Tails [ 05/Feb/13 ] |
|
Thanks for the update. |
| Comment by Blake Beaupain [ 05/Feb/13 ] |
|
I am no longer able to reproduce the problem, seems to be resolved. |
| Comment by Tails [ 05/Feb/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. |