[SERVER-15280] copyDatabase does not provide namespace validation Created: 17/Sep/14  Updated: 11/Jul/16  Resolved: 10/Oct/14

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 2.7.6
Fix Version/s: 2.7.8

Type: Bug Priority: Major - P3
Reporter: Davide Italiano Assignee: J Rassi
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Tested
Operating System: ALL
Sprint: Query 2.7.8
Participants:

 Description   

When an (invalid) todb argument that contains a dot is provided, copyDatabase just ignores everything that comes after the dot, and copy to the destination database instead of failing.

e.g. something like this

> db.copyDatabase("test", "local.whatever", "localhost")

will return:

{ "ok" : 1 }

and the content of tests will be copied in "local" database.



 Comments   
Comment by Githook User [ 10/Oct/14 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-15280 Validate copydb command "todb" field
Branch: master
https://github.com/mongodb/mongo/commit/050c963ea58b4fb02dde7ddc70d4cdc6afc3d501

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