<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:17:00 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>[CDRIVER-3043] valid_hostname() should not rejects strings with trailing dots</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3043</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/1.13.0/src/libmongoc/src/mongoc/mongoc-uri.c#L116&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;valid_hostname()&lt;/tt&gt;&lt;/a&gt; rejects strings that start or end with a dot. This method was introduced in &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/a625b39a2ef868c879b9a6b5eacd2697ddc9a772&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a625b39&lt;/a&gt; for &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2257&quot; title=&quot;Initial DNS Seedlist discovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2257&quot;&gt;&lt;del&gt;CDRIVER-2257&lt;/del&gt;&lt;/a&gt;. As discussed in &lt;a href=&quot;https://github.com/mongodb/mongo-php-driver/issues/968#issuecomment-476883918&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb/mongo-php-driver#968&lt;/a&gt;, &lt;a href=&quot;https://tools.ietf.org/html/rfc3986#page-21&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;section 3.2.2 of RFC3986&lt;/a&gt; states:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Such a name consists of a sequence of domain labels separated by &quot;.&quot;, each domain label starting and ending with an alphanumeric character and possibly also containing &quot;-&quot; characters.  The rightmost domain label of a fully qualified domain name in DNS &lt;em&gt;may be followed by a single &quot;.&quot;&lt;/em&gt; and should be if it is necessary to distinguish between the complete domain name and some local domain.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Between this and the grammar definitions in &lt;a href=&quot;https://tools.ietf.org/html/rfc3986#appendix-A&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Collected ABNF for URI&lt;/a&gt;, it looks like a trailing dot &lt;em&gt;is&lt;/em&gt; permitted in a valid host string. I&apos;m not sure if libmongoc is alone in disallowing trailing dots in its &lt;tt&gt;valid_hostname()&lt;/tt&gt; function, which is used for general URI parsing and DNS seedlist discovery (SRV).&lt;/p&gt;

&lt;p&gt;The structure of a hostname not explicitly addressed in the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SRV&lt;/a&gt; or &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/connection-string/connection-string-spec.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Connection String&lt;/a&gt; specs, but &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/connection-string/connection-string-spec.rst#host&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Connection String: Host&lt;/a&gt; does reference RFC3986 as the authority on host strings.&lt;/p&gt;</description>
                <environment></environment>
        <key id="723626">CDRIVER-3043</key>
            <summary>valid_hostname() should not rejects strings with trailing dots</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="13201">Fixed</resolution>
                                        <assignee username="jmikola@mongodb.com">Jeremy Mikola</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Tue, 26 Mar 2019 23:00:05 +0000</created>
                <updated>Sat, 28 Oct 2023 11:29:21 +0000</updated>
                            <resolved>Thu, 16 Jan 2020 18:43:38 +0000</resolved>
                                    <version>1.9.0</version>
                                    <fixVersion>1.16.0</fixVersion>
                                    <component>libmongoc</component>
                    <component>uri</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2735451" author="xgen-internal-githook" created="Thu, 16 Jan 2020 18:43:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeremy Mikola&apos;, &apos;username&apos;: &apos;jmikola&apos;, &apos;email&apos;: &apos;jmikola@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3043&quot; title=&quot;valid_hostname() should not rejects strings with trailing dots&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3043&quot;&gt;&lt;del&gt;CDRIVER-3043&lt;/del&gt;&lt;/a&gt; allow trailing dot in SRV service&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/c9e7c8158d21d3975bfda7273e6c40855035ae76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/c9e7c8158d21d3975bfda7273e6c40855035ae76&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2193497" author="jmikola@gmail.com" created="Wed, 27 Mar 2019 17:55:42 +0000"  >&lt;p&gt;In &lt;a href=&quot;https://github.com/mongodb/mongo-php-driver/issues/968#issuecomment-477273727&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this comment in mongodb/mongo-php-driver#968&lt;/a&gt;, I realize the significance of a trailing dot in a host name to indicate the &quot;root of the DNS tree&quot; and prevent a resolver from appending a system default domain name. The user in question was applying a trailing dot in their connection string to utilize &lt;a href=&quot;https://www.consul.io/docs/platform/k8s/dns.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Consul DNS on Kubernetes&lt;/a&gt;, but libmongoc rejected an SRV result for not including the same trailing dot.&lt;/p&gt;

&lt;p&gt;Noting the use of trialing dots for this purpose, I&apos;m curious if &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/1.13.0/src/libmongoc/src/mongoc/mongoc-uri.c#L125&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;validate_srv_result()&lt;/tt&gt;&lt;/a&gt; would be justified in allowing an optional trailing dot in the original service string and ignoring it for the purposes of suffix matching. Alternatively, I&apos;m curious if there is a fault or risk in our existing suffix matching because we may be doing these comparisons before a DNS server might append its own suffix during resolution.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="724098">DRIVERS-2057</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="724094">DRIVERS-2087</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="458414">SERVER-31965</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="420554">CDRIVER-2257</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|huhjsn:</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>