<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:10:16 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-46007] mongo causes os shell crash if we type ctrl + c when entering password in stdin</title>
                <link>https://jira.mongodb.org/browse/SERVER-46007</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In linux platform:&lt;/p&gt;

&lt;p&gt;When we login to mongo server in shell with `-p` args but don&apos;t pass the password in the argument list, then mongo shell will prompt us `Enter password:` to enter the password from stdin. At that time, if we send `ctrl +c`(SIGINT) to stdin, the mongo shell will be closed, but at the same time, user&apos;s os shell will be crashed, and we will input nothing in the shell. We must close the whole shell session and login again to do other maintaining job.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;In windows platform, there is no such problem.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;I think we should ignore `ctrl c` when we type password in stdin, just like other database client shell, such as mysql.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1133018">SERVER-46007</key>
            <summary>mongo causes os shell crash if we type ctrl + c when entering password in stdin</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-stm">Backlog - Server Tooling and Methods (STM)</assignee>
                                    <reporter username="lifubang@acmcoder.com">Fubang Li</reporter>
                        <labels>
                            <label>rp-c</label>
                    </labels>
                <created>Thu, 6 Feb 2020 07:00:19 +0000</created>
                <updated>Tue, 6 Dec 2022 02:36:37 +0000</updated>
                            <resolved>Fri, 3 Dec 2021 18:47:44 +0000</resolved>
                                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="4398517" author="billy.donahue" created="Tue, 8 Mar 2022 17:46:55 +0000"  >&lt;p&gt;I just found this old PR related to this ticket, with me as reviewer. Taking myself off of it. It is probably not relevant anymore, but left for completeness.&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/pull/1348&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/1348&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4230190" author="brooke.miller" created="Fri, 3 Dec 2021 18:47:44 +0000"  >&lt;p&gt;We&apos;ve deprecated the mongo shell in favor of the new &lt;a href=&quot;https://docs.mongodb.com/mongodb-shell/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongosh&lt;/a&gt;. Unfortunately, we aren&apos;t able to pursue improvements to the deprecated shell except in extreme cases, such as critical security fixes. Please start making use of &lt;a href=&quot;https://docs.mongodb.com/mongodb-shell/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongosh&lt;/a&gt; and let us know if it works for you in this case.&lt;/p&gt;</comment>
                            <comment id="3089908" author="oleg.pudeyev" created="Fri, 15 May 2020 15:07:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ryan.timmons&quot; class=&quot;user-hover&quot; rel=&quot;ryan.timmons&quot;&gt;ryan.timmons&lt;/a&gt; Per my comment in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27560?focusedCommentId=3089900&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-3089900&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-27560?focusedCommentId=3089900&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-3089900&lt;/a&gt;, I personally am not experiencing this issue at all and thus I disagree with the proposed PR, per &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46007?focusedCommentId=2982492&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2982492&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-46007?focusedCommentId=2982492&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2982492&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="3080565" author="ryan.timmons" created="Tue, 12 May 2020 13:45:35 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=oleg.pudeyev&quot; class=&quot;user-hover&quot; rel=&quot;oleg.pudeyev&quot;&gt;oleg.pudeyev&lt;/a&gt; please see Carl&apos;s comment above about PRs - can you submit a PR via Rietveld?&lt;/p&gt;</comment>
                            <comment id="2982492" author="oleg.pudeyev" created="Mon, 16 Mar 2020 22:59:34 +0000"  >&lt;p&gt;If the pull request (&lt;a href=&quot;https://github.com/mongodb/mongo/pull/1348&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/1348&lt;/a&gt;) indeed makes the server ignore ctrl-c when asking for password, I would think this is a much worse user experience compared to the proper fix for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27560&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-27560&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2883361" author="carl.champain" created="Tue, 18 Feb 2020 21:57:57 +0000"  >&lt;p&gt;Moving this ticket to the appropriate team to review the pull request.&lt;/p&gt;</comment>
                            <comment id="2855636" author="dmitry.agranat" created="Mon, 10 Feb 2020 11:29:47 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lifubang%40acmcoder.com&quot; class=&quot;user-hover&quot; rel=&quot;lifubang@acmcoder.com&quot;&gt;lifubang@acmcoder.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thanks for the report. This issue seems similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27560&quot; title=&quot;Ctrl-c in shell password input leaves terminal in non-echo mode&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27560&quot;&gt;&lt;del&gt;SERVER-27560&lt;/del&gt;&lt;/a&gt;, please let us know if this is the case and if the workaround mentioned in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27560&quot; title=&quot;Ctrl-c in shell password input leaves terminal in non-echo mode&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27560&quot;&gt;&lt;del&gt;SERVER-27560&lt;/del&gt;&lt;/a&gt; is acceptable.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Dima&lt;/p&gt;</comment>
                            <comment id="2822648" author="lifubang@acmcoder.com" created="Fri, 7 Feb 2020 01:28:19 +0000"  >&lt;p&gt;Sorry, I wrote something wrong in description, and I don&apos;t know how to edit the description, so I post a comment here.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;The correct description is here:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In linux platform:&lt;/p&gt;

&lt;p&gt;When we login to mongo server in shell with `-p` args but don&apos;t pass the password in the argument list, then mongo shell will prompt us `Enter password:` to enter the password from stdin. At that time, if we send `ctrl +c`(SIGINT) to stdin, the mongo shell will be closed, but at the same time, user&apos;s os shell will be crashed, and &lt;b&gt;we can&apos;t input anything in user&apos;s os main shell now&lt;/b&gt;. We must close the whole shell session and login again to do other maintaining job.&lt;/p&gt;

&lt;p&gt;In windows platform, there is no such problem.&lt;/p&gt;

&lt;p&gt;I think we should ignore `ctrl c` when we type password in stdin, just like other database client shell, such as mysql.&lt;/p&gt;</comment>
                    </comments>
                    <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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25142"><![CDATA[Server Tooling & Methods]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 10 Feb 2020 00:01:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 48 weeks, 1 day 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 48 weeks, 1 day ago
                        </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>backlog-server-stm</customfieldvalue>
            <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>brooke.miller@mongodb.com</customfieldvalue>
            <customfieldvalue>carl.champain@mongodb.com</customfieldvalue>
            <customfieldvalue>dmitry.agranat@mongodb.com</customfieldvalue>
            <customfieldvalue>lifubang@acmcoder.com</customfieldvalue>
            <customfieldvalue>oleg.pudeyev@mongodb.com</customfieldvalue>
            <customfieldvalue>ryan.timmons@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hwo7zj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwc88f:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;login a new linux shell, and use mongo shell:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;root@DESKTOP-UVUP1SF:/opt/mongo# build/opt/mongo/mongo localhost:14821/admin -u node -p&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;Press enter key, then it will prompt us to enter password without echo in the screen:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;root@DESKTOP-UVUP1SF:/opt/mongo# build/opt/mongo/mongo localhost:14821/admin -u node -p&lt;/p&gt;

&lt;p&gt;Enter password:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;At that time, we input some password, but don&apos;t press enter key. Instead of it, we type `ctrl c`:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;root@DESKTOP-UVUP1SF:/opt/mongo# build/opt/mongo/mongo localhost:14821/admin -u node -p&lt;/p&gt;

&lt;p&gt;Enter password: 2020-02-06T12:14:21.173+0800 I CONTROL &lt;span class=&quot;error&quot;&gt;&amp;#91;main&amp;#93;&lt;/span&gt; shutting down with code:0&lt;br/&gt;
root@DESKTOP-UVUP1SF:/opt/mongo#&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;Because of SIGINT, the mongo shell closed normally, and returned to user&apos;s os main shell.&lt;/p&gt;

&lt;p&gt;But in user&apos;s os main shell, we can&apos;t input anything more.&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;root@DESKTOP-UVUP1SF:/opt/mongo# build/opt/mongo/mongo localhost:14821/admin -u node -p&lt;/p&gt;

&lt;p&gt;Enter password: 2020-02-06T12:14:21.173+0800 I CONTROL &lt;span class=&quot;error&quot;&gt;&amp;#91;main&amp;#93;&lt;/span&gt; shutting down with code:0&lt;br/&gt;
root@DESKTOP-UVUP1SF:/opt/mongo# root@DESKTOP-UVUP1SF:/opt/mongo# root@DESKTOP-UVUP1SF:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;User&apos;s os main shell is crash now.&lt;/p&gt;</customfieldvalue>

                        </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>
                                    <customfieldvalue><![CDATA[dmitry.agranat@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hwnu8v:</customfieldvalue>

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