<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:04 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>[GODRIVER-2644] The Percent Encoded Password Connectstring is not parsed correctly in the topology at Connect time</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2644</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;
&lt;h4&gt;&lt;a name=&quot;Intopology.go%28v1.11.0%29line239connectionstringt.cfg.URIisparsedwithgenericurl.Parse%28...%29insteadofconnstring.Parse%28...%29&quot;&gt;&lt;/a&gt;In topology.go (v1.11.0) line 239 connection string t.cfg.URI is parsed with generic url.Parse(...) instead of connstring.Parse(...)&lt;/h4&gt;

&lt;p&gt;If connection string contains Percent Encoded Password reports error (as example)&lt;/p&gt;

&lt;p&gt;parse &quot;mongodb+srv://user:test%2F%40&quot;: invalid port &quot;:test%2F%40&quot; after host&lt;/p&gt;

&lt;p&gt;in func (t *Topology) Connect() error {...}&#160;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Is possible to reproduce using mongo Client Connect with a connection string with these characteristics&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;func TestURI(t *testing.T) &lt;/p&gt;
{
&#160; uri0 := &quot;mongodb+srv://user:test%2F%40pwd@myatlasproject.mongodb.net/admin?retryWrites=true&amp;amp;w=majority&quot;
&#160; uri, err := url.Parse(uri0)
&#160; // uri, err := connstring.Parse(uri0)
&#160; assert.NoError(t, err)
&#160; fmt.Println(uri)
}
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;I suggest replacing the command in topology.go &lt;span class=&quot;error&quot;&gt;&amp;#91;line 239 in function Connect()&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;uri, err := url.Parse(t.cfg.URI)&lt;/p&gt;

&lt;p&gt;with&#160;&lt;/p&gt;

&lt;p&gt;uri, err := connstring.Parse(t.cfg.URI)&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;NOTE:&lt;/p&gt;

&lt;p&gt;I have set the bug as a blocker because it does not allow me to keep the library up to date, but I don&apos;t know if it matches your priority criteria&lt;/p&gt;</description>
                <environment></environment>
        <key id="2176196">GODRIVER-2644</key>
            <summary>The Percent Encoded Password Connectstring is not parsed correctly in the topology at Connect time</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="13202">Works as Designed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="m.rozzati@teamsystem.com">Marco Rozzati</reporter>
                        <labels>
                            <label>Bug</label>
                    </labels>
                <created>Mon, 7 Nov 2022 09:59:03 +0000</created>
                <updated>Fri, 27 Oct 2023 13:16:21 +0000</updated>
                            <resolved>Mon, 7 Nov 2022 20:53:57 +0000</resolved>
                                    <version>1.11.0</version>
                    <version>1.10.4</version>
                                                    <component>Connection String</component>
                    <component>Connections</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="4958562" author="JIRAUSER1271735" created="Mon, 7 Nov 2022 10:27:17 +0000"  >&lt;p&gt;I&apos;m SORRY, please reject the bug&lt;br/&gt;
=========================&lt;/p&gt;

&lt;p&gt;This connection-string reports exactly the error&lt;/p&gt;

&lt;p&gt;mongodb+srv://user:&amp;lt;C%2F%40#@myatlasproject.mongodb.net/admin?retryWrites=true&amp;amp;w=majority&lt;/p&gt;

&lt;p&gt;Received unexpected error:&lt;br/&gt;
parse &quot;mongodb+srv://user:&amp;lt;C%2F%40&quot;: invalid port &quot;:&amp;lt;C%2F%40&quot; after host&lt;/p&gt;

&lt;p&gt;BUT this connection string is not correctly escaped, although it worked flawlessly in older versions!&lt;/p&gt;

&lt;p&gt;I Apologize!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0zm8w:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>