<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:13:31 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-1883] libbson should ensure regex options are sorted</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1883</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;libbson doesn&apos;t appear to validate the options string.  It just passes through the  exact cstring without checking that only valid letters are included (i.e. &quot;ismxlu&quot;).&lt;/p&gt;</description>
                <environment></environment>
        <key id="326544">CDRIVER-1883</key>
            <summary>libbson should ensure regex options are sorted</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="9">Done</resolution>
                                        <assignee username="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Tue, 25 Oct 2016 02:40:43 +0000</created>
                <updated>Mon, 17 Apr 2017 15:42:30 +0000</updated>
                            <resolved>Tue, 28 Feb 2017 21:11:38 +0000</resolved>
                                                    <fixVersion>1.7.0</fixVersion>
                                    <component>libbson</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1535990" author="xgen-internal-githook" created="Wed, 29 Mar 2017 15:16:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jmikola&apos;, u&apos;name&apos;: u&apos;Jeremy Mikola&apos;, u&apos;email&apos;: u&apos;jmikola@gmail.com&apos;}
&lt;p&gt;Message: Update XFAILS for BSON corpus tests&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1883&quot; title=&quot;libbson should ensure regex options are sorted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1883&quot;&gt;&lt;del&gt;CDRIVER-1883&lt;/del&gt;&lt;/a&gt; was resolved, so regex-valid-005.phpt no longer fails.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1966&quot; title=&quot;Extended JSON date expects milliseconds wrapped in $numberLong&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1966&quot;&gt;&lt;del&gt;CDRIVER-1966&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1967&quot; title=&quot;Extended JSON int64 expects wrapping in $numberLong&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1967&quot;&gt;&lt;del&gt;CDRIVER-1967&lt;/del&gt;&lt;/a&gt; were addressed by a new bson_as_extended_json() function for &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1947&quot; title=&quot;Improve libbson compatibility with the BSON Corpus tests&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1947&quot;&gt;&lt;del&gt;CDRIVER-1947&lt;/del&gt;&lt;/a&gt;. These tests still fail, but can now depend on &lt;a href=&quot;https://jira.mongodb.org/browse/PHPC-941&quot; title=&quot;Introduce API for converting BSON to canonical and relaxed extended JSON&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PHPC-941&quot;&gt;&lt;del&gt;PHPC-941&lt;/del&gt;&lt;/a&gt;, which will update the driver to use that new function.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-php-driver/commit/59f3d9d3c415c36a275ddcee0321290d1ffc3656&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-php-driver/commit/59f3d9d3c415c36a275ddcee0321290d1ffc3656&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1511626" author="jesse" created="Tue, 28 Feb 2017 21:11:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/libbson/commit/b6144f580251b74c0ab1bf71c8e5ce22c44ae250&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/b6144f580251b74c0ab1bf71c8e5ce22c44ae250&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1440176" author="xgen-internal-githook" created="Tue, 22 Nov 2016 16:09:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jmikola&apos;, u&apos;name&apos;: u&apos;Jeremy Mikola&apos;, u&apos;email&apos;: u&apos;jmikola@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/PHPC-829&quot; title=&quot;BSON Regex flags must be alphabetically ordered&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PHPC-829&quot;&gt;&lt;del&gt;PHPC-829&lt;/del&gt;&lt;/a&gt;: BSON Regex flags must be alphabetically ordered&lt;/p&gt;

&lt;p&gt;We do not test that MongoDB\BSON\fromJSON() alphabetizes the flags, as that will be handled by &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1883&quot; title=&quot;libbson should ensure regex options are sorted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1883&quot;&gt;&lt;del&gt;CDRIVER-1883&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-php-driver/commit/dd1a758f00f22f8d5ba269650b4c25a177510b84&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-php-driver/commit/dd1a758f00f22f8d5ba269650b4c25a177510b84&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1420033" author="david.golden" created="Thu, 27 Oct 2016 22:36:33 +0000"  >&lt;p&gt;I have amended the BSON corpus already and filed &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-331&quot; title=&quot;BSON Regex flags must be alphabetically ordered&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-331&quot;&gt;&lt;del&gt;DRIVERS-331&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What I meant by filing a SPEC ticket would be against BSON to remove the alpha sort. I have no interest in that and from what &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=behackett&quot; class=&quot;user-hover&quot; rel=&quot;behackett&quot;&gt;behackett&lt;/a&gt; says, there are server reasons why that would likely be rejected anyway.&lt;/p&gt;</comment>
                            <comment id="1420022" author="bjori" created="Thu, 27 Oct 2016 22:21:29 +0000"  >&lt;p&gt;Did you ever open that SPEC ticket &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt;? Could you link it when you have?&lt;/p&gt;</comment>
                            <comment id="1417399" author="david.golden" created="Tue, 25 Oct 2016 20:25:26 +0000"  >&lt;p&gt;Same issue sorting on subdocuments.  Annoying as heck in Perl where hash key order is guaranteed random (PERL-346).&lt;/p&gt;</comment>
                            <comment id="1417388" author="behackett" created="Tue, 25 Oct 2016 20:18:32 +0000"  >&lt;p&gt;It turns out the order of the options is considered when sorting stored regular expressions. Why anyone would need to sort on stored regular expressions (or store regular expressions in the first place) is beyond me, but that would appear to be the reason for the requirement.&lt;/p&gt;</comment>
                            <comment id="1417350" author="behackett" created="Tue, 25 Oct 2016 19:52:01 +0000"  >&lt;p&gt;Also, we don&apos;t document that order matters in the server docs:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/query/regex/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/operator/query/regex/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1417348" author="behackett" created="Tue, 25 Oct 2016 19:50:16 +0000"  >&lt;blockquote&gt;&lt;p&gt;which must be stored in alphabetical order&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Huh, I&apos;ve never noticed that and know not all drivers do it. It doesn&apos;t seem to matter on the server at all. Also, dotall (&quot;s&quot;) was added in, if I remember correctly, MongoDB 2.0. So there is precedent for adding support for new flags. &lt;/p&gt;</comment>
                            <comment id="1417089" author="david.golden" created="Tue, 25 Oct 2016 17:00:05 +0000"  >&lt;p&gt;A softer version of this would be the &quot;accept lax; emit strict&quot; and that&apos;s probably better.&lt;/p&gt;</comment>
                            <comment id="1417063" author="david.golden" created="Tue, 25 Oct 2016 16:38:57 +0000"  >&lt;p&gt;Sounds like we need a SPEC ticket for the BSON spec itself to amend it.  I don&apos;t know who on the server team &quot;owns&quot; BSON, but maybe we can use this issue to flush that out.&lt;/p&gt;

&lt;p&gt;I don&apos;t have strong feelings about most of these (e.g. booleans must be 0 or 1 versus 0 or non-zero); I&apos;m just documenting my discoveries as &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=behackett&quot; class=&quot;user-hover&quot; rel=&quot;behackett&quot;&gt;behackett&lt;/a&gt; asked me to do.&lt;/p&gt;</comment>
                            <comment id="1417040" author="bjori" created="Tue, 25 Oct 2016 16:21:04 +0000"  >&lt;p&gt;See linked ticket. Lots of drivers used to even compile this down to their native regex format. Noone ever mentioned that this should be validated or can only contain 6 predefined characters.&lt;/p&gt;

&lt;p&gt;Adding this validation I am very worried we will break current use of this type. Be it abuse or not.&lt;/p&gt;</comment>
                            <comment id="1417027" author="david.golden" created="Tue, 25 Oct 2016 16:14:42 +0000"  >&lt;p&gt;Note, also the &quot;alphabetical order&quot; part.  I don&apos;t believe libbson checks that either.&lt;/p&gt;</comment>
                            <comment id="1417023" author="david.golden" created="Tue, 25 Oct 2016 16:14:05 +0000"  >&lt;p&gt;The spec says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Regular expression - The first cstring is the regex pattern, the second is the regex options string. Options are identified by characters, which must be stored in alphabetical order. Valid options are &apos;i&apos; for case insensitive matching, &apos;m&apos; for multiline matching, &apos;x&apos; for verbose mode, &apos;l&apos; to make \w, \W, etc. locale dependent, &apos;s&apos; for dotall mode (&apos;.&apos; matches everything), and &apos;u&apos; to make \w, \W, etc. match unicode.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That&apos;s pretty clear what &quot;valid&quot; means.&lt;/p&gt;

&lt;p&gt;I have no objection if someone wants to change the spec.  If particular projects choose to ignore the spec, that&apos;s the responsibility of the project owners.&lt;/p&gt;

&lt;p&gt;But, under the principle that the spec is the law, I&apos;ve added a test case for this to the BSON corpus so we at least learn which drivers comply and which don&apos;t.&lt;/p&gt;</comment>
                            <comment id="1417002" author="bjori" created="Tue, 25 Oct 2016 16:02:35 +0000"  >&lt;p&gt;I&apos;ve never heard that this should be validated. The server doesn&apos;t validate it either, and allowing only a restricted set will prohibit the server from expanding its capabilities in the future - and worse, when it does, we&apos;ll never actually realize it and continue to block the new options.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="329532">CXX-1118</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="326795">DRIVERS-331</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="341638">PHPC-885</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="326784">DOCS-9208</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="70645">DRIVERS-82</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="327736">CDRIVER-1889</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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CDRIVER-1947</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrb5db:</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="1602">C Driver 2017 2 - Feb 10, 2019</customfieldvalue>

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