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

db.createUser not filtered from ctrl+r history search

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.5.4
    • Component/s: Security
    • Labels:
      None
    • Environment:
      OS X 10.8.4
      MongoDB 2.5.4 community edition
    • ALL
    • Hide

      1.) Start up 2.5.4 with a --keyFile /path/to/key.file
      2.) use admin
      3.) db.createUser({user:"[user]",pwd:"[pw]", roles:[

      {role:"root",db:"admin"}

      ]})
      4.) ctrl-d (logout)
      5.) shell in again
      6.) [ctrl+r] -> 'create'

      Show
      1.) Start up 2.5.4 with a --keyFile /path/to/key.file 2.) use admin 3.) db.createUser({user:" [user] ",pwd:" [pw] ", roles:[ {role:"root",db:"admin"} ]}) 4.) ctrl-d (logout) 5.) shell in again 6.) [ctrl+r] -> 'create'

      While testing the clusterMonitor permission, I noticed the mongo shell was not filtering out my prior db.createUser(...) command.

      [john@John-Morales-MacBook-Pro mongodb-osx-x86_64-2.5.4]$ ./bin/mongo --port 55000
      MongoDB shell version: 2.5.4
      connecting to: 127.0.0.1:55000/test
      Error while trying to show server startup warnings: not authorized on admin to execute command { getLog: "startupWarnings" }
      (reverse-i-search)`create': db.createUser({user:"[user]",pwd:"[pw]", roles:[{role:"root",db:"admin"}]})
      

            Assignee:
            andreas.nilsson Andreas Nilsson
            Reporter:
            john.morales@mongodb.com John Morales (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: