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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.5.4
    • 2.5.3
    • Security
    • None
    • ALL

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: