Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15280

copyDatabase does not provide namespace validation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.8
    • Affects Version/s: 2.7.6
    • Component/s: Write Ops
    • ALL
    • Query 2.7.8

      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.

            Assignee:
            rassi J Rassi
            Reporter:
            davide.italiano Davide Italiano
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: