[SERVER-5121] while profile level is 2, auth using a user not exists in the db will lost connection Created: 28/Feb/12  Updated: 15/Aug/12  Resolved: 02/Mar/12

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 2.0.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: xie zhenye Assignee: Kristina Chodorow (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File instance.cpp.patch    
Issue Links:
Duplicate
duplicates SERVER-5033 Database with auth turned on and prof... Closed
Operating System: ALL
Participants:

 Description   

while profile level is 2, auth using a user not exists in the db will lost connection. and this problem still exists in current 2.1.0 version.

$ ./mongo
MongoDB shell version: 2.0.2
connecting to: test
> use admin
switched to db admin
> db.auth('admin','.....')
1
> use test2
switched to db test2
> db.getProfiling
db.getProfilingLevel( db.getProfilingStatus(
> db.getProfilingLevel()
0
> db.setProfilingLevel(2)

{ "was" : 0, "slowms" : 100, "ok" : 1 }

>
bye

$ ./mongo
MongoDB shell version: 2.0.2
connecting to: test
> use test2

switched to db test2
> db.auth('aa','aa')

Tue Feb 28 15:34:15 DBClientCursor::init call() failed
Tue Feb 28 15:34:15 query failed : test2.$cmd

{ authenticate: 1.0, user: "aa", nonce: "b813a5f7a1f96482", key: "f8535382b1996acf257ddbbae7f4f638" }

to: 127.0.0.1
Tue Feb 28 15:34:15 Error: error doing query: failed shell/
collection.js:151
Tue Feb 28 15:34:15 trying reconnect to 127.0.0.1
Tue Feb 28 15:34:15 reconnect 127.0.0.1 ok



 Comments   
Comment by Kristina Chodorow (Inactive) [ 02/Mar/12 ]

Sorry, too late.

Comment by xie zhenye [ 29/Feb/12 ]

should apply this modification first on version 2.0.2 before apply my patch.

https://github.com/mongodb/mongo/commit/86e26ee445a85c72d16d2864c2f33e4f6dbaa3fd

Generated at Thu Feb 08 03:07:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.