Mongo shell lets you switch to a database named ""

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.7.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Windows
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The shell will let you set the current database to "". Illustration below:

      > use
      switched to db
      > db

      > show collections
      Tue Nov 30 17:33:48 uncaught exception: error:

      { "$err" : "db name can't be empty", "code" : 13075 }

      The use command without a parameter should display an error and not change the current database.

              Assignee:
              Dwight Merriman
              Reporter:
              Justin Dearing
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: