<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:09:25 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-5616] Any shell command containing the string &quot;.auth&quot; is not added to shell history</title>
                <link>https://jira.mongodb.org/browse/SERVER-5616</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Instead of removing only db.auth() lines from the history, any command containing &quot;.auth&quot; is removed.  This is annoying because &quot;.auth&quot; is used fairly often, e.g., db.authors.find() or db.issue.find(&lt;/p&gt;
{&quot;comment.author&quot;: &quot;bill&quot;}
&lt;p&gt;)&lt;/p&gt;</description>
                <environment></environment>
        <key id="36366">SERVER-5616</key>
            <summary>Any shell command containing the string &quot;.auth&quot; is not added to shell history</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</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="schwerin@mongodb.com">Andy Schwerin</assignee>
                                    <reporter username="dan@mongodb.com">Daniel Pasette</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Apr 2012 12:30:06 +0000</created>
                <updated>Wed, 22 Aug 2018 02:45:24 +0000</updated>
                            <resolved>Wed, 2 May 2012 18:51:28 +0000</resolved>
                                    <version>2.1.0</version>
                                    <fixVersion>2.1.2</fixVersion>
                                    <component>Shell</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="115695" author="auto" created="Wed, 2 May 2012 18:49:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;amcfague&apos;, u&apos;name&apos;: u&apos;Andrew McFague&apos;, u&apos;email&apos;: u&apos;redmumba@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5616&quot; title=&quot;Any shell command containing the string &amp;quot;.auth&amp;quot; is not added to shell history&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5616&quot;&gt;&lt;del&gt;SERVER-5616&lt;/del&gt;&lt;/a&gt; Any shell command containing the string &quot;.auth&quot; is not added to shell history&lt;/p&gt;

&lt;p&gt;In the case where items such as `db.author` are used, these would&lt;br/&gt;
normally be omitted--which isn&apos;t what&apos;s needed.  Furthermore, items like&lt;br/&gt;
`db.auth   ()` are also permitted, and should not be displayed.  This&lt;br/&gt;
replaces the existing `strstr` check with a regular expression using&lt;br/&gt;
PCRE.&lt;/p&gt;

&lt;p&gt;Signed-off-by: Andy Schwerin &amp;lt;schwerin@10gen.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e7f372246bacc255231d9b2c5a8d8483881ecdad&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e7f372246bacc255231d9b2c5a8d8483881ecdad&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="114268" author="amcfague" created="Fri, 27 Apr 2012 07:03:17 +0000"  >&lt;p&gt;Added PCRE code to be smarter about the check, and requested a pull request.  I believe this will handle many of the issues, but let me know if this is not what is intended.&lt;/p&gt;

&lt;p&gt;Tested this out locally against master, and it worked beautifully!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/pull/215&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/215&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="112433" author="scotthernandez" created="Mon, 23 Apr 2012 03:42:06 +0000"  >&lt;p&gt;Brian, this is really another discussion, or at least belongs elsewhere; see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2770&quot; title=&quot;Any collection name on db w/corresponding function name fail&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2770&quot;&gt;&lt;del&gt;SERVER-2770&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="112427" author="nairbv" created="Mon, 23 Apr 2012 02:43:52 +0000"  >&lt;p&gt;ah, I see... so I suppose the records were actually created and that explains why there was no error message.&lt;/p&gt;

&lt;p&gt;It does seem a bit confusing to need to use a different (less well documented) syntax for accessing collections in these cases though.  I still think it would be preferable if collections could consistently be accessed with the quicker-to-type db.&amp;lt;collectionname&amp;gt; without other database management functions in that scope.  I realize that&apos;s a separate issue, but it seems related to the general problem of the shell confusing db.auth with the user&apos;s intended reference to a collection with a name containing &quot;auth&quot;&lt;/p&gt;
</comment>
                            <comment id="112266" author="scotthernandez" created="Sat, 21 Apr 2012 14:04:44 +0000"  >&lt;p&gt;Brian, your first issues is not the same as the one described here. You are describing a problem with the mongo javascript shell and our automartic collection resolving &amp;#8211; in that fields/functions on the db object resolve first because collect names do.&lt;/p&gt;

&lt;p&gt;You can get around your first problem by doing this:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.getCollection(&quot;auth.credentials&quot;).find()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The collection name with &quot;auth&quot; at the front is not invalid.&lt;/p&gt;</comment>
                            <comment id="112241" author="nairbv" created="Sat, 21 Apr 2012 10:04:04 +0000"  >&lt;p&gt;I&apos;m also experiencing this issue...  and I think there&apos;s more to this problem than just adding a character to a single string comparison.&lt;/p&gt;

&lt;p&gt;I initially tried to create a collection with a namespace &quot;auth,&quot; so I could have collection names like db.auth.credentials and db.auth.permissions in my application.  I didn&apos;t realize this wasn&apos;t permitted so got cryptic error messages:&lt;br/&gt;
&amp;gt; db.auth.credentials.find()&lt;br/&gt;
Sat Apr 21 17:39:52 TypeError: db.auth.credentials has no properties (shell):1&lt;br/&gt;
&amp;gt;&lt;/p&gt;

&lt;p&gt;Ideally this error message should be more informative.&lt;/p&gt;

&lt;p&gt;My (scala) application also didn&apos;t throw any exceptions on trying to insert to this invalid collection, but I haven&apos;t investigated exactly which error handling failed.&lt;/p&gt;

&lt;p&gt;When I figured out what was going on I changed my namespace to &quot;authentication,&quot; with collections like &quot;authentication.credentials,&quot; and realized that shell history was missing.&lt;/p&gt;

&lt;p&gt;The filter should only specifically filter out commands that are mongodb specific auth calls that include mongo specific passwords.  Even matching db.auth isn&apos;t great as someone could in theory have a collection named &quot;db.db.auth.&quot;  I&apos;m new to mongodb and I&apos;m not sure if it&apos;s possible for users to add some kind of trigger/function to a collection?  If so, filtering out &quot;.auth(&quot; could also filter out a user function even if the white space issue is solved.&lt;/p&gt;

&lt;p&gt;But, generally, &quot;auth&quot; is probably a pretty common name for a collection.  I realize this might not be great for backwards compatibility, but shouldn&apos;t mongodb&apos;s internal auth collection be something a bit less intrusive to an application?  Maybe have something like &quot;internals.auth&quot; or &quot;mongo.auth&quot; instead of &quot;db.auth&quot; ?  Likewise for addUser.&lt;/p&gt;





</comment>
                            <comment id="110408" author="dan@10gen.com" created="Mon, 16 Apr 2012 20:57:53 +0000"  >&lt;p&gt;Wouldn&apos;t help in the case of &quot;.auth (&quot; &amp;#8211; you would have to find occurrence of &quot;.auth&quot;, then verify that next non-whitespace char is a &quot;(&quot;&lt;/p&gt;</comment>
                            <comment id="110182" author="tad" created="Mon, 16 Apr 2012 12:49:05 +0000"  >&lt;p&gt;Would it help if we did the filtering when we save the history to .dbshell instead of immediately?  Even preventing a user from recalling a mistyped db.auth() command two seconds after they type it is a little unfriendly.  Would changing the comparison text from &quot;.auth&quot; to &quot;.auth(&quot; fix this?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="592157">SERVER-36802</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 16 Apr 2012 12:49:05 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 42 weeks 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>kevin.pulo@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 42 weeks 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>amcfague</customfieldvalue>
            <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>nairbv</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>tad</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro5nz:</customfieldvalue>

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

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

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