<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 11:56:51 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[MC-2140] Connecting to a server with a space in the name fails</title>
                <link>https://bugs.mojang.com/browse/MC-2140</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;Thebug&quot;&gt;&lt;/a&gt;The bug&lt;/h3&gt;
&lt;p&gt;Should DNS names be validated to be correct, then remove incorrect characters? Or at least strip whitespace on either side?&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Howtoreproduce&quot;&gt;&lt;/a&gt;How to reproduce&lt;/h3&gt;
&lt;p&gt;Connect to &quot; x.nerd.nu&quot;, you&apos;ll get an error about the server not being found. &lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Potentialfix&quot;&gt;&lt;/a&gt;Potential fix&lt;/h3&gt;
&lt;p&gt;Easy way to fix in java:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; servername; &lt;span class=&quot;code-comment&quot;&gt;//assuming we&apos;re storing the info from the &lt;span class=&quot;code-quote&quot;&gt;&quot;Server Address&quot;&lt;/span&gt; box into a string
&lt;/span&gt;servername = servername.trim();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="13537">MC-2140</key>
            <summary>Connecting to a server with a space in the name fails</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="slicedlime">[Mojang] slicedlime</assignee>
                                    <reporter username="zifnab06">Tom Powell</reporter>
                        <labels>
                    </labels>
                <created>Sat, 3 Nov 2012 21:21:39 +0100</created>
                <updated>Wed, 18 Aug 2021 15:39:42 +0200</updated>
                            <resolved>Fri, 27 Sep 2019 11:35:18 +0200</resolved>
                                    <version>Minecraft 1.4.2</version>
                    <version>Minecraft 1.5</version>
                    <version>Minecraft 1.5.2</version>
                    <version>Minecraft 1.6.2</version>
                    <version>Minecraft 1.7.4</version>
                    <version>Minecraft 14w08a</version>
                    <version>Minecraft 1.8</version>
                    <version>Minecraft 1.8.1-pre3</version>
                    <version>Minecraft 1.8.8</version>
                    <version>Minecraft 15w49b</version>
                    <version>Minecraft 1.10.2</version>
                    <version>Minecraft 16w32a</version>
                    <version>Minecraft 16w42a</version>
                    <version>Minecraft 16w43a</version>
                    <version>Minecraft 1.11.2</version>
                    <version>Minecraft 17w06a</version>
                    <version>Minecraft 1.12</version>
                    <version>Minecraft 1.12.1 Pre-Release 1</version>
                    <version>Minecraft 1.12.1</version>
                    <version>Minecraft 1.12.2</version>
                    <version>Minecraft 17w50a</version>
                    <version>Minecraft 1.13</version>
                    <version>Minecraft 18w31a</version>
                    <version>Minecraft 18w32a</version>
                    <version>Minecraft 1.13.1</version>
                    <version>Minecraft 1.13.2</version>
                    <version>Minecraft 19w03b</version>
                    <version>Minecraft 19w03c</version>
                                    <fixVersion>19w39a</fixVersion>
                                                        <votes>14</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="484510" author="kraif" created="Fri, 24 Aug 2018 17:44:36 +0200"  >&lt;p&gt;Confirmed for 1.13.1.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="398951" author="bemoty" created="Sat, 12 Aug 2017 01:58:42 +0200"  >&lt;p&gt;Can confirm for MC 1.12.1.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bugs.mojang.com/secure/ViewProfile.jspa?name=FaRo1&quot; class=&quot;user-hover&quot; rel=&quot;FaRo1&quot;&gt;FaRo1&lt;/a&gt;, when you type in &quot; google.com&quot; in the URL bar of your web browser, your browser won&apos;t tell you that the URL is invalid because it omits trailing and leading whitespaces by default. It does that because there are people out there in the vastness of the internet who are very good at making typos. Since whitespaces are invisible, those people probably wouldn&apos;t notice it when there was a whitespace at the beginning or at the end of the URL they just typed in and would very likely complain why they can&apos;t reach that URL. The same goes for Minecraft servers.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bugs.mojang.com/secure/ViewProfile.jspa?name=Kumasasa&quot; class=&quot;user-hover&quot; rel=&quot;kumasasa&quot;&gt;Kumasasa&lt;/a&gt;&apos;s quote is very fitting here.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Make something idiot proof and nature will create a better idiot.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="317621" author="farogaming" created="Mon, 27 Jun 2016 00:49:35 +0200"  >&lt;p&gt;For me it says &quot;Unknown host&quot;, which is correct, because there&apos;s no server named &quot; localhost&quot;. Where is the bug?&lt;/p&gt;</comment>
                            <comment id="316869" author="__null" created="Thu, 23 Jun 2016 18:21:47 +0200"  >&lt;p&gt;Confirmed for &lt;font color=&quot;#060&quot;&gt;&lt;b&gt;1.10.2&lt;/b&gt;&lt;/font&gt;. &quot; localhost&quot; results in &quot;cannot resolve hostname&quot; instead of &quot;can&apos;t connect to server&quot;.&lt;/p&gt;</comment>
                            <comment id="142351" author="kruoli" created="Fri, 21 Feb 2014 22:42:45 +0100"  >&lt;p&gt;Confirmed in &lt;b&gt;14w08a&lt;/b&gt;. You may also mention that you are able to add a server to the server list with address &quot; &quot; and nothing more.&lt;/p&gt;</comment>
                            <comment id="94366" author="s3bash" created="Thu, 25 Jul 2013 22:04:17 +0200"  >&lt;p&gt;Version 1.6.2 is still affected by white space pre or post pended to the server address will prevent it from finding the server. &lt;/p&gt;</comment>
                            <comment id="53395" author="zifnab06" created="Fri, 15 Mar 2013 03:51:48 +0100"  >&lt;p&gt;Tested on 1.5, still effected (&quot; x.nerd.nu&quot; failed to connect, &quot;x.nerd.nu&quot; is fine). Thanks for the reminder!&lt;/p&gt;</comment>
                            <comment id="53392" author="bljat" created="Fri, 15 Mar 2013 03:47:26 +0100"  >&lt;p&gt;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.&lt;/p&gt;</comment>
                            <comment id="49938" author="nuxas" created="Tue, 5 Mar 2013 10:31:24 +0100"  >&lt;p&gt;How about showing a warning dialog that informs the user that there is leading space in the address and tell them to remove it&amp;lt;/irony&amp;gt;&lt;/p&gt;</comment>
                            <comment id="30570" author="zuckel" created="Mon, 24 Dec 2012 22:18:32 +0100"  >&lt;p&gt;In any case just trim the String. It&apos;s very easy to get a surplus whitespace in when copying an address out of a web browser.&lt;/p&gt;

&lt;p&gt;Further checking can be very tricky due to IDNA.&lt;/p&gt;</comment>
                            <comment id="22247" author="kumasasa" created="Fri, 16 Nov 2012 21:02:13 +0100"  >&lt;p&gt;But don&apos;t forget Darwin:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Make something idiot proof and nature will create a better idiot.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="22242" author="amaethon" created="Fri, 16 Nov 2012 20:50:39 +0100"  >&lt;p&gt;Its not truly a bug, but could easily be rectified by removing all spaces from the server name string before attempting to connect.  Removing the spaces should have no adverse affects as a server name can&apos;t have a space in it anyway.&lt;/p&gt;

&lt;p&gt;Remember, bug fixes aren&apos;t always the result of bugs, sometimes they are just idiot proofing.&lt;/p&gt;</comment>
                            <comment id="18761" author="wilco1e" created="Tue, 6 Nov 2012 12:03:30 +0100"  >&lt;p&gt;How is this a bug? &quot; server.spaceribs.com&quot; doesn&apos;t exist, so it should not be found.&lt;/p&gt;</comment>
                            <comment id="18131" author="chalmes" created="Sun, 4 Nov 2012 20:42:52 +0100"  >&lt;p&gt;Confirmed:&lt;/p&gt;

&lt;p&gt;Perhaps some whitespace stripping and some regular expressions to validate the entry as valid IP/hostname:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;ValidIpAddressRegex = &quot;^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$&quot;;
ValidHostnameRegex = &quot;^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$&quot;;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 22 Nov 2012 21:21:00 +0100</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11901" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Category</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11623"><![CDATA[UI]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10303"><![CDATA[Confirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_12200" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Mojang Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11703"><![CDATA[Low]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0d89j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12201" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>Triaged Time</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 18 Aug 2021 15:39:42 +0200</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>