<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:02:46 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>[CXX-1476] Element search stops prematurely due to missing string length check</title>
                <link>https://jira.mongodb.org/browse/CXX-1476</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;Hi! After upgrading driver I cant parse oplog documents which contains &quot;$set&quot;. Example:&lt;br/&gt;
json print { &quot;op&quot; : &quot;u&quot;, &quot;o&quot; : { &quot;$set&quot; : &lt;/p&gt;
{ &quot;a&quot; : 1 }
&lt;p&gt;}}&lt;br/&gt;
after getting element &quot;o&quot; it becomes utf8 and contains &quot;u&quot; &lt;/p&gt;</description>
                <environment>debian 9</environment>
        <key id="463518">CXX-1476</key>
            <summary>Element search stops prematurely due to missing string length check</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="13201">Fixed</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="denbip">Denis Bip</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 Nov 2017 10:21:58 +0000</created>
                <updated>Sat, 28 Oct 2023 11:27:36 +0000</updated>
                            <resolved>Wed, 6 Dec 2017 14:52:15 +0000</resolved>
                                    <version>3.2.0-rc0</version>
                                    <fixVersion>3.2.0-rc1</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1744112" author="xgen-internal-githook" created="Wed, 6 Dec 2017 14:51:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Morrow&apos;, &apos;username&apos;: &apos;acmorrow&apos;, &apos;email&apos;: &apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1476&quot; title=&quot;Element search stops prematurely due to missing string length check&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1476&quot;&gt;&lt;del&gt;CXX-1476&lt;/del&gt;&lt;/a&gt; Handle searches for empty key names correctly&lt;/p&gt;

&lt;p&gt;Also, adds a regression test for &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1476&quot; title=&quot;Element search stops prematurely due to missing string length check&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1476&quot;&gt;&lt;del&gt;CXX-1476&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/52c56be1eb266a9fcafc7df7ef8124a93458be6b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/52c56be1eb266a9fcafc7df7ef8124a93458be6b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1744111" author="xgen-internal-githook" created="Wed, 6 Dec 2017 14:51:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Morrow&apos;, &apos;username&apos;: &apos;acmorrow&apos;, &apos;email&apos;: &apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1476&quot; title=&quot;Element search stops prematurely due to missing string length check&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1476&quot;&gt;&lt;del&gt;CXX-1476&lt;/del&gt;&lt;/a&gt; Handle searches for empty key names correctly&lt;/p&gt;

&lt;p&gt;Also, adds a regression test for &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1476&quot; title=&quot;Element search stops prematurely due to missing string length check&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1476&quot;&gt;&lt;del&gt;CXX-1476&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/52c56be1eb266a9fcafc7df7ef8124a93458be6b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/52c56be1eb266a9fcafc7df7ef8124a93458be6b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1744110" author="xgen-internal-githook" created="Wed, 6 Dec 2017 14:51:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;kevin1018&apos;, &apos;username&apos;: &apos;kevin1018&apos;, &apos;email&apos;: &apos;wangxk1028@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1476&quot; title=&quot;Element search stops prematurely due to missing string length check&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1476&quot;&gt;&lt;del&gt;CXX-1476&lt;/del&gt;&lt;/a&gt; Fix compare key name error&lt;/p&gt;

&lt;p&gt;If a document has a &quot;de&quot; key and a &quot;desc&quot; key, when searching for the &quot;de&quot; key, it may match the &quot;desc&quot; key.&lt;br/&gt;
So judge the key length to make sure match the right key.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/c80ce3e8638975baa0f82aa54e28ce416896b219&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/c80ce3e8638975baa0f82aa54e28ce416896b219&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1741266" author="denbip" created="Mon, 4 Dec 2017 09:42:26 +0000"  >&lt;p&gt;Hi! Thank&apos;s!  &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/607&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/607&lt;/a&gt; is not my issue &lt;/p&gt;</comment>
                            <comment id="1740853" author="acm" created="Sat, 2 Dec 2017 18:42:10 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=denbip&quot; class=&quot;user-hover&quot; rel=&quot;denbip&quot;&gt;denbip&lt;/a&gt; - I did a little digging - and I think this issue was introduced during the changes for &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-992&quot; title=&quot;bsoncxx::document::view::find() should be rewritten to avoid string allocation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-992&quot;&gt;&lt;del&gt;CXX-992&lt;/del&gt;&lt;/a&gt;. &lt;/p&gt;</comment>
                            <comment id="1740812" author="acm" created="Sat, 2 Dec 2017 15:52:39 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=denbip&quot; class=&quot;user-hover&quot; rel=&quot;denbip&quot;&gt;denbip&lt;/a&gt; -&lt;/p&gt;

&lt;p&gt;First, thank you for testing out the release candidate. We really appreciate it and also appreciate your taking the time to report issues you have encountered.&lt;/p&gt;

&lt;p&gt;I&apos;m having a little trouble understanding exactly what problem you are encountering from the description in this ticket, but I &lt;b&gt;think&lt;/b&gt; that what you are saying is that when you ask for the &lt;tt&gt;o&lt;/tt&gt; element you are actually getting the &lt;tt&gt;op&lt;/tt&gt; element, in which case, does this PR address your issue: &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/607?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/607?&lt;/a&gt; If so, are you the author? Is that what you mean by &quot;return old code back?&quot;, or something else.&lt;/p&gt;

</comment>
                            <comment id="1734239" author="denbip" created="Fri, 24 Nov 2017 19:24:40 +0000"  >&lt;p&gt;So, I found issue. It is view::const_iterator view::find(stdx::string_view key) const, I&apos;ve return old code back and now it works&lt;/p&gt;</comment>
                            <comment id="1734177" author="denbip" created="Fri, 24 Nov 2017 16:31:24 +0000"  >&lt;p&gt;It seems something wrong with operator[] in bsoncxx::document::element&lt;/p&gt;</comment>
                            <comment id="1734176" author="denbip" created="Fri, 24 Nov 2017 16:30:12 +0000"  >&lt;p&gt;Also it doesnt work with arrays. Example:&lt;br/&gt;
{ &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;58dcc9b7c45a4e05d33fa85e&quot; }
&lt;p&gt;, &quot;id_client&quot; : 24, &quot;code_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;58dcadd1c45a4e67e04a78df&quot; }
&lt;p&gt;, &quot;code&quot; : [ { &quot;_id&quot; : &lt;/p&gt;
{ &quot;$oid&quot; : &quot;58dcadd1c45a4e67e04a78df&quot; }
&lt;p&gt;, &quot;seria&quot; : &quot;EEE&quot;, &quot;number&quot; : &quot;123&quot; } ] }&lt;br/&gt;
trying to get &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;code&amp;quot;&amp;#93;&lt;/span&gt; it returns oid with value &quot;58dcadd1c45a4e67e04a78df&quot;, but not an array&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                                                <inwardlinks description="is caused by">
                                        <issuelink>
            <issuekey id="308651">CXX-992</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="467407">CDRIVER-2414</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <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_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|hr9kxb:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2030">Platforms 2017-12-18</customfieldvalue>

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