Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-1433

UDP Query Protocol does not properly unpack/pack integers, session IDs are not returned correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.4.7
    • Minecraft 1.4.2
    • All environments.
    • Unconfirmed

      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.
      Thank you for your time.

            Unassigned Unassigned
            blakeman8192 Blake Beaupain
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: