[SERVER-72090] system.users can be renamed to regular collections and vice versa Created: 13/Dec/22  Updated: 29/Oct/23  Resolved: 18/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Vishnu Kaushik Assignee: Josef Ahmad
Resolution: Fixed Votes: 0
Labels: intern-friendly, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-79836 Upgrade FCV Constants and Tag the fir... Closed
depends on SERVER-80520 Investigate and temporarily disable f... Closed
Related
related to SERVER-75651 Exhaustively identify internal namesp... Open
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2023-06-12, Execution EMEA Team 2023-06-26, Execution EMEA Team 2023-07-10, Execution EMEA Team 2023-07-24, Execution EMEA Team 2023-08-21, Execution EMEA Team 2023-09-04, Execution EMEA Team 2023-09-18, Execution EMEA Team 2023-10-02
Participants:
Linked BF Score: 5

 Description   

We are able to rename test.system.js to test.mycoll and vice versa. This seems odd and maybe shouldn't be allowed.

db.system.js.insert({a: 2}); // system.js is a special system collection that users are allowed to write to.
db.system.js.renameCollection("mycoll"); // OK
db.mycoll.renameCollection("system.js"); // OK

Please backport this if you decide to do it.



 Comments   
Comment by Githook User [ 18/Sep/23 ]

Author:

{'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}

Message: SERVER-72090 system.users shouldn't be renamed to regular collections and vice versa
Branch: master
https://github.com/mongodb/mongo/commit/c597b0cb900d7d21a2252c743717842b4f29d7cd

Comment by Pavithra Vetriselvan [ 20/Dec/22 ]

We should also look into cross database renames when investigating this ticket.

Comment by Gregory Noma [ 13/Dec/22 ]

Looks like we prevented system.js from being renamed in SERVER-64491. For system.users seems like a duplicate of SERVER-5955.

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