<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:31:28 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-75942] Check that database name is valid UTF-8 when creating a new database </title>
                <link>https://jira.mongodb.org/browse/SERVER-75942</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;h5&gt;&lt;a name=&quot;Objective&quot;&gt;&lt;/a&gt;Objective&lt;/h5&gt;
&lt;p&gt;Have the server validate database names and prohibit invalid UTF-8 when creating a new database. In addition, add a special internal setParameter that disables this validation, so that a mongorestore/mongosync that must preserve these bad names has an escape valve to do so. Also, check if the name is valid during upgrade and block upgrade if the name is invalid (see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76793?focusedCommentId=5477961&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-5477961&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;comment&lt;/a&gt; on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76793&quot; title=&quot;Warn when database names are invalid UTF-8&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-76793&quot;&gt;&lt;del&gt;SERVER-76793&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;h5&gt;&lt;a name=&quot;OriginalDescription&quot;&gt;&lt;/a&gt;Original Description&lt;/h5&gt;

&lt;p&gt;When running the attached &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/442257/442257_bad_dbname.cpp&quot; title=&quot;bad_dbname.cpp attached to SERVER-75942&quot;&gt;bad_dbname.cpp&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;script with mongod, we allow the database name to have an invalid utf-8 character (eg. &quot;name\xbc&quot;). &lt;/p&gt;

&lt;p&gt;When running with mongos, the sharding catalog manager checks if the dbName already exists. It also does a case insensitive match by filtering on the regex (&lt;a href=&quot;https://github.com/10gen/mongo/blob/master/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp/#L176-L180&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/blob/master/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp/#L176-L180&lt;/a&gt;). In doing so, the regex fails with invalid utf-8 (&lt;a href=&quot;https://github.com/10gen/mongo/blob/master/src/mongo/db/matcher/expression_leaf.cpp/#L245-L247&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/blob/master/src/mongo/db/matcher/expression_leaf.cpp/#L245-L247&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;We should not allow creating a database with an invalid utf-8 in any of the cases.&lt;/p&gt;

&lt;p&gt;This was motivated by investigating &#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57026&quot; title=&quot;Regular expression is invalid UTF-8 while enabling mongo backwards-incompatible 4.0 features&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57026&quot;&gt;&lt;del&gt;SERVER-57026&lt;/del&gt;&lt;/a&gt;&#160;and&#160;&lt;del&gt;HELP-43395.&lt;/del&gt; We should verify that after this change the invalid entries listed in the tickets cannot be created.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2311686">SERVER-75942</key>
            <summary>Check that database name is valid UTF-8 when creating a new database </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="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="adi.agrawal@mongodb.com">Adi Agrawal</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Apr 2023 15:22:46 +0000</created>
                <updated>Tue, 30 Jan 2024 15:21:55 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="5489308" author="kyle.suarez" created="Fri, 9 Jun 2023 20:57:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=cailin.nelson%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;cailin.nelson@mongodb.com&quot;&gt;cailin.nelson@mongodb.com&lt;/a&gt;, I&apos;ve updated the description.&lt;/p&gt;

&lt;p&gt;Adding this to the next query execution quick win bucket.&lt;/p&gt;</comment>
                            <comment id="5477965" author="JIRAUSER1265607" created="Tue, 6 Jun 2023 14:01:04 +0000"  >&lt;p&gt;Considering&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-76793&quot; title=&quot;Warn when database names are invalid UTF-8&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-76793&quot;&gt;&lt;del&gt;SERVER-76793&lt;/del&gt;&lt;/a&gt; (closed as dup with this ticket), we should check if the name is valid during upgrade and block upgrade if the name is invalid.&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="2312178">TOOLS-3286</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="2312175">DOCS-16030</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="2331036">SERVER-76793</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2435067">SERVER-80788</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2331036">SERVER-76793</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2306625">SERVER-75659</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1722105">SERVER-57026</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="442257" name="bad_dbname.cpp" size="3359" author="adi.agrawal@mongodb.com" created="Tue, 11 Apr 2023 15:18:15 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 11 Apr 2023 21:30:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        34 weeks, 5 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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>This ticket has some interesting upgrade and migration (mongosync et al.) considerations. A user that somehow ends up with one of these bad UTF-8 database names will need to remove or rename them before upgrading.&lt;br/&gt;
&lt;br/&gt;
I am marking documentation changes as &amp;quot;Needed&amp;quot; as, if we make this change, we should update this page on MongoDB database name restrictions: &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/limits/&quot;&gt;https://www.mongodb.com/docs/manual/reference/limits/&lt;/a&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16942"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-3574</customfieldvalue>
                        </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>ana.meza@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            34 weeks, 5 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>adi.agrawal@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>kyle.suarez@mongodb.com</customfieldvalue>
            <customfieldvalue>xiaochen.wu@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2472n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1mivc:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Add bad_dbname.cpp to SConscript (in db_integration_test lib)&lt;/p&gt;

&lt;p&gt;Compile&lt;/p&gt;

&lt;p&gt;Run buildscripts/resmoke.py run --suite=integration_tests_sharded ./build/install/bin/db_integration_test&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_17051" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Teams Impacted</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16943"><![CDATA[Cloud]]></customfieldvalue>
    <customfieldvalue key="16944"><![CDATA[Docs]]></customfieldvalue>
    <customfieldvalue key="16946"><![CDATA[Triage and Release]]></customfieldvalue>
    <customfieldvalue key="25043"><![CDATA[Migrator]]></customfieldvalue>
    <customfieldvalue key="24662"><![CDATA[TAR (DB Tools, Mongomirror, Mongosync)]]></customfieldvalue>
    
                        </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|i23t7z:</customfieldvalue>

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