<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:23 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>[GODRIVER-2351] Collection.FindOne panics on nil FindOneOptions.</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2351</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;The FindOne method on a Collection panics due to nil pointer dereference on a nil FindOneOption.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;

&lt;p&gt;Problem initially discovered on v1.8.2 installation but is observed to persist in MongoDB Driver version v1.8.4.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;
&lt;ol&gt;
	&lt;li&gt;Create a collection.&lt;/li&gt;
	&lt;li&gt;Create a list of options.FindOneOptions containing 1&#160;&lt;em&gt;nil&lt;/em&gt; options.FindOneOption.&lt;/li&gt;
	&lt;li&gt;Pass the list to collection.FindOne&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;Dereferencing a &lt;em&gt;nil&lt;/em&gt;&#160;FindOneOption results in a panic.&#160;Please see&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/630ff7cbfd2363b49bfa48968b80ce287e70ae85/mongo/collection.go#L1315&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/blob/630ff7cbfd2363b49bfa48968b80ce287e70ae85/mongo/collection.go#L1315&lt;/a&gt;|https://github.com/mongodb/mongo-go-driver/blob/630ff7cbfd2363b49bfa48968b80ce287e70ae85/mongo/collection.go#L1315],]&lt;/p&gt;</description>
                <environment></environment>
        <key id="2005018">GODRIVER-2351</key>
            <summary>Collection.FindOne panics on nil FindOneOptions.</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="benji.rewis@mongodb.com">Benji Rewis</assignee>
                                    <reporter username="vaguemail369@gmail.com">Faithfulness Alamu</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Mar 2022 00:08:38 +0000</created>
                <updated>Sat, 28 Oct 2023 11:37:37 +0000</updated>
                            <resolved>Mon, 28 Mar 2022 18:48:50 +0000</resolved>
                                    <version>1.8.4</version>
                                    <fixVersion>1.8.5</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4439558" author="benji.rewis" created="Mon, 28 Mar 2022 18:48:50 +0000"  >&lt;p&gt;Hello again, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vaguemail369%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;vaguemail369@gmail.com&quot;&gt;vaguemail369@gmail.com&lt;/a&gt;! The bug fix should be available in the upcoming version 1.8.5 of the Go driver.&lt;/p&gt;</comment>
                            <comment id="4439554" author="xgen-internal-githook" created="Mon, 28 Mar 2022 18:48:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Benjamin Rewis&apos;, &apos;email&apos;: &apos;32186188+benjirewis@users.noreply.github.com&apos;, &apos;username&apos;: &apos;benjirewis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2351&quot; title=&quot;Collection.FindOne panics on nil FindOneOptions.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2351&quot;&gt;&lt;del&gt;GODRIVER-2351&lt;/del&gt;&lt;/a&gt; Add missing nil option checks (#883)&lt;br/&gt;
Branch: release/1.8&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/97b1b72992b0640341dfc7c077120fce02865a6d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/97b1b72992b0640341dfc7c077120fce02865a6d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4439537" author="xgen-internal-githook" created="Mon, 28 Mar 2022 18:44:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Benjamin Rewis&apos;, &apos;email&apos;: &apos;32186188+benjirewis@users.noreply.github.com&apos;, &apos;username&apos;: &apos;benjirewis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2351&quot; title=&quot;Collection.FindOne panics on nil FindOneOptions.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2351&quot;&gt;&lt;del&gt;GODRIVER-2351&lt;/del&gt;&lt;/a&gt; Add missing nil option checks (#883)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/a6626e6319abd02a29faa8ed35a0de71ee17575b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/a6626e6319abd02a29faa8ed35a0de71ee17575b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4426470" author="benji.rewis" created="Tue, 22 Mar 2022 13:33:44 +0000"  >&lt;p&gt;Thanks again for your report, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vaguemail369%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;vaguemail369@gmail.com&quot;&gt;vaguemail369@gmail.com&lt;/a&gt;. This is indeed a bug, we should have a check for &lt;tt&gt;opt == nil&lt;/tt&gt; in the code you&apos;ve pointed to. We&apos;re also missing similar checks in a few other, user-facing APIs. Here&apos;s a PR to add them in:&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/883&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/883&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="4425113" author="benji.rewis" created="Mon, 21 Mar 2022 20:17:54 +0000"  >&lt;p&gt;Thanks for your bug report, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vaguemail369%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;vaguemail369@gmail.com&quot;&gt;vaguemail369@gmail.com&lt;/a&gt;! We&apos;re looking into this now.&lt;/p&gt;</comment>
                    </comments>
                    <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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

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