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

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.4.2
    • Fix Version/s: Minecraft 1.4.7
    • Labels:
    • 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.
      Thank you for your time.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: