[SERVER-22577] mmapv1 should not allow creation of database names containing $ Created: 11/Feb/16  Updated: 05/Dec/16  Resolved: 29/Mar/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.3.1
Fix Version/s: 3.3.4

Type: Improvement Priority: Major - P3
Reporter: Robert Guo (Inactive) Assignee: Robert Guo (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-9518 Docs for SERVER-22577: mmapv1 should ... Closed
Related
related to SERVER-21696 applyOps with invalid ns field trigge... Closed
related to SERVER-10926 NamespaceString inconsistent on allow... Closed
Backwards Compatibility: Minor Change
Sprint: TIG 12 (04/01/16)
Participants:

 Description   

This was first discovered by jonathan.abrahams in the linked ticket.

When we do an insert, a DatabaseCatalogEntry is created implicitly before validating the namespace string (batch_executor.cpp). The insert would fail after the DatbaseCatalogEntry is created.

For KVEngines, creating a DatabaseCatalogEntry is basically a noop (kv_storage_engine.cpp), so no harm is done.

For mmapv1, a data file with an invalid name would be created in (mmap_v1_database_catalog_entry.cpp). Subsequent calls to show dbs would require getting the list of data files and this invalid one will show up.



 Comments   
Comment by Robert Guo (Inactive) [ 29/Mar/16 ]

Users will need to drop any databases containing a "$" in the database name before upgrading to 3.3.4 or above.

Comment by Githook User [ 29/Mar/16 ]

Author:

{u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}

Message: SERVER-22577 disallow creation of databases containing $ on mmapv1
Branch: master
https://github.com/mongodb/mongo/commit/e242b49373f0a9ee39f2b02f1a766a84c2c869b6

Comment by J Rassi [ 22/Mar/16 ]

Setting "minor change" for backwards compatibility, as databases created in this way will have to be dropped before the 3.2=>3.4 upgrade process can be started.

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