[SERVER-38887] Mongo.getDBs() does not correctly inspect privileges Created: 08/Jan/19  Updated: 29/Oct/23  Resolved: 10/Jan/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.6, 4.1.7

Type: Bug Priority: Major - P3
Reporter: Sara Golemon Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by DOCS-12160 Docs for SERVER-36262: mongo shell: a... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v4.0
Sprint: Security 2019-01-14
Participants:

 Comments   
Comment by Githook User [ 18/Jan/19 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-38887 Return names encapsulated when falling back on privilege inspection

(cherry picked from commit 116a97a5dac8ebf8784b15ff09569afd9032cdc6)
Branch: v4.0
https://github.com/mongodb/mongo/commit/508ca70c796d643327d27a108aa7ad3aefa850b5

Comment by Githook User [ 18/Jan/19 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-38887 Treat undefined filter object as unfiltered in Mongo.getDBs()

(cherry picked from commit 1f4273e900adc4e47cdaf816925affa20cf51a40)
Branch: v4.0
https://github.com/mongodb/mongo/commit/1176598c287ec62f52107ef99b8f1a66b6dc6d8a

Comment by Githook User [ 18/Jan/19 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-38887 Return names encapsulated when falling back on privilege inspection
Branch: master
https://github.com/mongodb/mongo/commit/116a97a5dac8ebf8784b15ff09569afd9032cdc6

Comment by Sara Golemon [ 14/Jan/19 ]

Ugh. Yeah.  That's what comes from the `show` helper being hard to unit test.
Fix incoming...

Comment by Alyson Cabral (Inactive) [ 14/Jan/19 ]

When I run an evergreen patch of the shell with this feature against a 3.6.9 server I get the error:

MongoDB server version: 3.6.9
WARNING: shell and server versions do not match
MongoDB Enterprise Production0-shard-0:PRIMARY> show dbs
2019-01-14T15:09:44.070-0500 E QUERY [js] TypeError: dbs.databases is undefined :
shellHelper.show@src/mongo/shell/utils.js:907:9
shellHelper@src/mongo/shell/utils.js:792:15
@(shellhelp2):1:1

Comment by Githook User [ 10/Jan/19 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-38887 Treat undefined filter object as unfiltered in Mongo.getDBs()
Branch: master
https://github.com/mongodb/mongo/commit/1f4273e900adc4e47cdaf816925affa20cf51a40

Generated at Thu Feb 08 04:50:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.