Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1121

NoMethodError when usersInfo is called with server auth enabled and nonexistent username

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.2.6
    • Affects Version/s: 2.2.5
    • Component/s: None
    • Labels:
      None

      When mongod is started with the --auth flag:

      mongo(main)> client.database.users.info('nonexistent')
      DEBUG -- : MONGODB | localhost:27017 | admin.usersInfo | STARTED | {"usersInfo"=>"nonexistent"}
      DEBUG -- : MONGODB | localhost:27017 | admin.usersInfo | FAILED | not authorized on admin to execute command { usersInfo: "nonexistent" } (13) | 0.000906s
      NoMethodError: undefined method `each' for nil:NilClass
      from ../mongo-ruby-driver/lib/mongo/operation/result.rb:149:in `each'
      

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            emily.stolfo Emily Stolfo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: