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

Improve log message when auth'd user not found via mongos

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: 2.5.3
    • Component/s: Security
    • Labels:
      None
    • ALL

      If you attempt to do, in the shell:
      db.auth("asdf","1")
      when talking to mongos, and user "asdf" does not exist, the error message posted to the mongos log is:

      2013-10-24T13:40:23.671-0400 [conn1] Failed to authenticate asdf@admin with mechanism MONGODB-CR: AuthenticationFailed Unknown error code 10065 invalid parameter: expected an object ()
      

      This is due to the userInfo command returning an empty "users" array but the code logic is not checking for this condition and is attempting to reference the first element of that array unilaterally (hence the BSON "expected an object" message)

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: