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

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 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
    • Fix Version/s: 19w39a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      UI
    • Mojang Priority:
      Trivial

      Description

      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();
      

        Attachments

          Activity

            People

            • Assignee:
              slicedlime [Mojang] slicedlime
              Reporter:
              zifnab06 Tom Powell
            • Votes:
              14 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: