<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:03:20 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-3538] UTF8 null character \u0000 in the middle of a string is not handled correctly</title>
                <link>https://jira.mongodb.org/browse/SERVER-3538</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;The valid UTF8 character \u0000 is not handled properly : the string is cut at this character. Mongo is probably interpreting it as a string terminating character.&lt;br/&gt;
Example :&lt;/p&gt;

&lt;p&gt;MongoDB shell version: 1.8.0&lt;br/&gt;
connecting to: test&lt;br/&gt;
&amp;gt; db.test.save(&lt;/p&gt;
{&apos;text&apos;: &apos;foo\u0000bar&apos;}
&lt;p&gt;)&lt;br/&gt;
&amp;gt; db.test.findOne()&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4e3bbbaa4e496a38200a6f81&quot;), &quot;text&quot; : &quot;foo&quot; }
&lt;p&gt;&amp;gt; db.test.findOne(&lt;/p&gt;
{text: /foo/}
&lt;p&gt;)&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4e3bbbaa4e496a38200a6f81&quot;), &quot;text&quot; : &quot;foo&quot; }
&lt;p&gt;&amp;gt; db.test.findOne(&lt;/p&gt;
{text: /bar/}
&lt;p&gt;)&lt;br/&gt;
null&lt;/p&gt;

&lt;p&gt;We use Mongo to log errors from various servers. We do not have any control on the string characters incoming and we have no workaround for this issue so far.&lt;br/&gt;
Thank you very much in advance for your feedback on this issue.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
CH.&lt;/p&gt;</description>
                <environment>Suse Linux Entreprise Server x86_64 10.3</environment>
        <key id="20528">SERVER-3538</key>
            <summary>UTF8 null character \u0000 in the middle of a string is not handled correctly</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="-1">Unassigned</assignee>
                                    <reporter username="cdadhemar">Charles-Henri d&amp;#39;Adh&#233;mar</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Aug 2011 09:56:52 +0000</created>
                <updated>Sun, 5 Jan 2014 06:46:35 +0000</updated>
                            <resolved>Fri, 5 Aug 2011 14:18:14 +0000</resolved>
                                    <version>1.8.0</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="46603" author="eliot" created="Fri, 5 Aug 2011 14:18:14 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1300&quot; title=&quot;use memcmp, not strcmp for comparing BSON strings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1300&quot;&gt;&lt;del&gt;SERVER-1300&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="46576" author="cdadhemar" created="Fri, 5 Aug 2011 11:35:44 +0000"  >&lt;p&gt;Here are some more information :&lt;/p&gt;

&lt;p&gt;In Python this case is handle correctly :&lt;/p&gt;

&lt;p&gt;In &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: import re&lt;/p&gt;

&lt;p&gt;In &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: text = u&apos;foo\u0000bar&apos;&lt;/p&gt;

&lt;p&gt;In &lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt;: re.search(&apos;foo&apos;, text)&lt;br/&gt;
Out&lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt;: &amp;lt;_sre.SRE_Match object at 0x2ba230d7bcc8&amp;gt;&lt;/p&gt;

&lt;p&gt;In &lt;span class=&quot;error&quot;&gt;&amp;#91;4&amp;#93;&lt;/span&gt;: re.search(&apos;bar&apos;, text)&lt;br/&gt;
Out&lt;span class=&quot;error&quot;&gt;&amp;#91;4&amp;#93;&lt;/span&gt;: &amp;lt;_sre.SRE_Match object at 0x2ba230d7bd30&amp;gt;&lt;/p&gt;

&lt;p&gt;In production we use the pymongo driver : the string &apos;foo\u0000bar&apos; is correctly saved in the DB and correctly retrieved by either the pymongo API or the interactive javascript shell. But a regex search on words after the &apos;\u0000&apos; character fails in either pymongo or interactive shell.&lt;/p&gt;

&lt;p&gt;The issue might come from several places :&lt;/p&gt;

&lt;p&gt;PCRE lib issue ?&lt;br/&gt;
UTF-8 vs UTF-32 used by Python on some Linux distro ?&lt;/p&gt;

&lt;p&gt;The issue is not as simple as &quot;in UTF8 the \u0000 is the string terminating character so this is working as designed&quot;.&lt;/p&gt;

&lt;p&gt;Do not hesitate to ask for more information.&lt;br/&gt;
Cheers,&lt;br/&gt;
CH&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="12253">SERVER-1300</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 5 Aug 2011 14:18:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 28 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_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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 28 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </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>cdadhemar</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrouhz:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23258</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|hszzc7:</customfieldvalue>

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