<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:16:50 UTC 2024

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>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-27997] mongo connection URI cannot connect when there&apos;s &quot;@&quot; character in password</title>
                <link>https://jira.mongodb.org/browse/SERVER-27997</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There is a &quot;@&quot; character in my password and I tried to use connection string URI to connect MongoDB &lt;/p&gt;

&lt;p&gt;&lt;sub&gt;mongo &apos;mongodb://user:abc@123@localhost:27017&apos;&lt;/sub&gt;&lt;/p&gt;

&lt;p&gt;And I get this error:&lt;/p&gt;

&lt;p&gt;~&#10140;  ~ mongo &apos;mongodb://da:abc@123@localhost:27017&apos;&lt;br/&gt;
MongoDB shell version v3.4.0&lt;br/&gt;
connecting to: mongodb://da:abc@123@localhost:27017&lt;br/&gt;
2017-02-14T15:02:59.061+0800 I NETWORK  &lt;span class=&quot;error&quot;&gt;&amp;#91;main&amp;#93;&lt;/span&gt; getaddrinfo(&quot;123@localhost&quot;) failed: nodename nor servname provided, or not known&lt;br/&gt;
2017-02-14T15:02:59.063+0800 E QUERY    &lt;span class=&quot;error&quot;&gt;&amp;#91;main&amp;#93;&lt;/span&gt; Error: couldn&apos;t initialize connection to host 123@localhost, address is invalid :&lt;br/&gt;
connect@src/mongo/shell/mongo.js:234:13&lt;br/&gt;
@(connect):1:6&lt;br/&gt;
exception: connect failed~&lt;/p&gt;

&lt;p&gt;But  &lt;sub&gt;mongo admin -u da -p &apos;abc@123&apos;&lt;/sub&gt;  works well.So I read the mongo shell and mongo-cxx-driver code and I found this:&lt;/p&gt;


&lt;p&gt;~namespace &lt;/p&gt;
{
const char kMongoDBURL[] =
    // scheme: non-capturing
    &quot;mongodb://&quot;
    // credentials: two inner captures for user and password
    &quot;(?:([^:]+)(?::([^@]+))?@)?&quot;
    // servers: grabs all host:port or UNIX socket names
    &quot;((?:(?:[^\\/]+|/.+.sock?),?)+)&quot;
    // database: matches anything but the chars that cannot
    // be part of a MongoDB database name.
    &quot;(?:/([^/\\.\\ \&quot;*&amp;lt;&amp;gt;:\\|\\?]*))?&quot;
    // options
    &quot;(?:\\?(?:(.+=.+)&amp;amp;?)+)*&quot;;
}
&lt;p&gt; // namespace~&lt;/p&gt;

&lt;p&gt;So it means that if my connection URI is &lt;/p&gt;

&lt;p&gt;&lt;sub&gt;mongo &apos;mongodb://user:abc@123@localhost:27017&apos;&lt;/sub&gt;&lt;/p&gt;

&lt;p&gt;it will return &lt;sub&gt;mongodb://da1:abc@&lt;/sub&gt; rather than &lt;sub&gt;mongodb://da1:abc@123@&lt;/sub&gt; ,is it a bug or I missed something?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="353695">SERVER-27997</key>
            <summary>mongo connection URI cannot connect when there&apos;s &quot;@&quot; character in password</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="spencer.jackson@mongodb.com">Spencer Jackson</assignee>
                                    <reporter username="tracyda">tracy</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Feb 2017 07:07:39 +0000</created>
                <updated>Wed, 31 May 2017 21:23:46 +0000</updated>
                            <resolved>Thu, 16 Feb 2017 16:30:21 +0000</resolved>
                                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1500198" author="spencer.jackson@10gen.com" created="Thu, 16 Feb 2017 16:29:50 +0000"  >&lt;p&gt;Hi! You are correct, and this isn&apos;t something you can do right now in a connection URI. In general, it&apos;s not possible to stick an &apos;@&apos; there given the URI format, so you&apos;re supposed to &lt;a href=&quot;https://en.wikipedia.org/wiki/Percent-encoding&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;percent encode&lt;/a&gt; the &apos;@&apos; into &apos;%40&apos;. Unfortunately, the shell doesn&apos;t currently support percent encoding. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-25059&quot; title=&quot;URL support needs to support percent-encoding (escape sequences)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-25059&quot;&gt;&lt;del&gt;SERVER-25059&lt;/del&gt;&lt;/a&gt; is tracking that bug. I&apos;m going to direct this ticket there, so please be sure to follow &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-25059&quot; title=&quot;URL support needs to support percent-encoding (escape sequences)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-25059&quot;&gt;&lt;del&gt;SERVER-25059&lt;/del&gt;&lt;/a&gt;  for further updates on this issue. Thanks!&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="301003">SERVER-25059</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 16 Feb 2017 13:58:11 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 51 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>backlog-server-pm</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 51 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>spencer.jackson@mongodb.com</customfieldvalue>
            <customfieldvalue>tracyda</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht2cnz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsuy2f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hs4gm7:</customfieldvalue>

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