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

Connecting to a server with a space in the name fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 19w39a
    • Minecraft 1.4.2, Minecraft 1.5, Minecraft 1.5.2, Minecraft 1.6.2, Minecraft 1.7.4, Minecraft 14w08a, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.8, Minecraft 15w49b, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w42a, Minecraft 16w43a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 1.13, Minecraft 18w31a, Minecraft 18w32a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w03b, Minecraft 19w03c
    • None
    • Confirmed
    • UI
    • Low

      The bug

      Should DNS names be validated to be correct, then remove incorrect characters? Or at least strip whitespace on either side?

      How to reproduce

      Connect to " x.nerd.nu", you'll get an error about the server not being found.

      Potential fix

      Easy way to fix in java:

      String servername; //assuming we're storing the info from the "Server Address" box into a string
      servername = servername.trim();
      

            slicedlime [Mojang] slicedlime
            zifnab06 Tom Powell
            Votes:
            14 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: