<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:19:11 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-8862] URL Encoding</title>
                <link>https://bugs.mojang.com/browse/MC-8862</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;There are a couple of issues regarding spaces in usernames I&apos;ve noticed while poking around the client (and I&apos;d guess the server as well). The key one that breaks many http servers is that you don&apos;t URLencode the strings, so that, say, &quot;Socks the Fox&quot; gets sent in the headers as this:&lt;br/&gt;
GET /MinecraftSkins/Socks the Fox.png HTTP/1.1&lt;/p&gt;

&lt;p&gt;Which looks fine until you realize that HTTP servers see a GET for &quot;/MinecraftSkins/Socks&quot; with a protocol version of &quot;the Fox.png HTTP/1.1&quot; It probably also causes issues with servers that don&apos;t like unencoded UTF characters in URLs, but I don&apos;t think that will be as problematic.&lt;/p&gt;

&lt;p&gt;If you&apos;d run the strings through URLencode.encode(x,x) you&apos;d get the proper URL:&lt;br/&gt;
GET /MinecraftSkins/Socks+the+Fox.png HTTP/1.1&lt;/p&gt;

&lt;p&gt;Combine this with better tokenizing of server commands (i.e. &apos;/give &quot;Socks the Fox&quot; 157&apos;) and you&apos;d be able to support spaces in names properly.&lt;/p&gt;

&lt;p&gt;Note that the issue also appears in the launcher as well, which breaks updating for users with spaces in their names &apos;cause it breaks up the requests and ends up asking for nonexistant files.&lt;/p&gt;

&lt;p&gt;So basically the fix is as simple as changing all the constructors for URLs from &quot;new URL(string);&quot; to &quot;new URL(URLEncoder.encode(string, &quot;UTF-8&quot;));&quot; which should be almost as easy as Find/Replace. You wanna be HTTP compliant, right? ;P&lt;/p&gt;</description>
                <environment>OS: Windows&lt;br/&gt;
Java: 1.7.something</environment>
        <key id="22161">MC-8862</key>
            <summary>URL Encoding</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="7">Invalid</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="socksthefox">Jade Harley</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Feb 2013 00:29:45 +0100</created>
                <updated>Mon, 29 Jul 2013 16:37:56 +0200</updated>
                            <resolved>Mon, 29 Jul 2013 16:37:56 +0200</resolved>
                                    <version>Minecraft 1.4.6</version>
                    <version>Minecraft 1.4.7</version>
                    <version>Snapshot 13w04a</version>
                    <version>Snapshot 13w05a</version>
                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="95208" author="bljat" created="Mon, 29 Jul 2013 16:37:56 +0200"  >&lt;p&gt;No answer, assuming no longer an issue.&lt;/p&gt;</comment>
                            <comment id="54915" author="bljat" created="Mon, 18 Mar 2013 02:40:28 +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="44089" author="socksthefox" created="Wed, 6 Feb 2013 23:31:43 +0100"  >&lt;p&gt;The URL encoding was a bug report because it&apos;s not standards-compliant. I think that maintaining standards compliance is important.&lt;/p&gt;

&lt;p&gt;As well, I don&apos;t see any reason for the Mojang to not support spaces in user names. It doesn&apos;t really add anything security wise, so it seemed kind of arbitrary. I don&apos;t expect them to drop everything to add spaces-in-usernames support, but they might want it some day and I&apos;d like to point out things that can help make it happen.&lt;/p&gt;

&lt;p&gt;As far as my moral compass, I lost that years ago. I just wander about until I find something interesting &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; I&apos;d be happy to give Mojang my source so they could see how I do it, and maybe protect against it in the future. It&apos;s a bit of a mess, but then again so is Minecraft &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/tongue.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;If you don&apos;t mind me asking, I&apos;d also like to know how you found my site, since I&apos;ve only released it to a few people yesterday and from what I can tell it doesn&apos;t show up in Google. Just interested &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="44002" author="torabi" created="Wed, 6 Feb 2013 18:52:51 +0100"  >&lt;p&gt;And why would Mojang be interested in helping you help others pirate Minecraft? While they have a pretty lax stance on piracy, I don&apos;t think they&apos;ll appreciate &lt;a href=&quot;http://mc.socksthefox.net/misc.php?action=help&amp;amp;hid=8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;your attempts&lt;/a&gt; to mimic the value-added services of authentication and custom skins that are supposed to be part of the motivation for purchasing Minecraft. You might want to get your moral compass checked; it seems a bit off.&lt;/p&gt;</comment>
                            <comment id="43533" author="socksthefox" created="Mon, 4 Feb 2013 22:09:15 +0100"  >&lt;p&gt;I&apos;ve gotten it so that I can intercept the important strings and filter them (the way Dean suggested, ATM) before sending them on to the URL constructors. HTTP servers have to accept UTF-8 URLs now anyway IIRC due to the new DNS specs, so spaces and a handful of other characters are the only thing that need to be escaped (and since I disallow &apos;/&apos; in usernames on my system purely due to filename issues I don&apos;t worry about that, though I could if I wanted to I guess).&lt;/p&gt;

&lt;p&gt;I&apos;ve also hacked in some basic command token parsing so that you can quote usernames with spaces and it&apos;ll work (i.e. &apos;/give &quot;Socks the Fox&quot; 137&apos; properly gives me my command block). Haven&apos;t tried it with a command block yet, but it&apos;s either already properly tokenized for spaced usernames or as simple as putting quotes around the @p or whatever in the command block command. Once I&apos;ve gotten the server version of my launcher finished I should have 100% spaces in usernames support. Because I can.&lt;/p&gt;

&lt;p&gt;HTTP standards compliance FTW!&lt;/p&gt;</comment>
                            <comment id="43295" author="unon1100" created="Sun, 3 Feb 2013 22:59:56 +0100"  >&lt;p&gt;I believe that this is fixed by replacing all of the Spaces with %20&lt;/p&gt;</comment>
                            <comment id="42437" author="socksthefox" created="Fri, 1 Feb 2013 17:46:15 +0100"  >&lt;p&gt;Not in &lt;em&gt;your&lt;/em&gt; system &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;It&apos;s okay, I&apos;ve already worked around it by running the URL constructor parameters through a simplified encoder before sending them off to their constructors. I still think it&apos;d be a good idea to run them through the URLencoder. There are plenty of non-technical users who might consider characters like &#252;&#244;&#310; etc. alphanumeric and this seems to be a rather ambiguous restriction on user names. Like I said, the URL encoding and simplistic command tokenization are the only thing between you and full Unicode-and-spaces-in-usernames support.&lt;/p&gt;</comment>
                            <comment id="42287" author="dinnerbone" created="Fri, 1 Feb 2013 11:57:50 +0100"  >&lt;p&gt;Do remember that player names cannot have spaces or non alphanumeric characters!&lt;/p&gt;</comment>
                            <comment id="42129" author="socksthefox" created="Fri, 1 Feb 2013 01:23:04 +0100"  >&lt;p&gt;Welp, after experimenting and finding out some stuff, it looks like the fix I proposed is not actually that simple. You&apos;d have to URLencoder.encode the name separately, before passing it to the rest of the string. Still, it&apos;s a good idea to properly sanitize your inputs.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Unconfirmed]]></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_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0ji73:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>