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

Remove dead code from JS client db.auth() workflow allowing three args

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 3.5.11
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Platforms 2017-08-21

      The raw mongoAuth() interface in the JS driver understands a three arg call as mongo.auth(db, user, pass) which is hardcoded to MONGODB-CR.

      In practice this is never reached since db.js normalizes calls to db.auth() into just the one (object) or two (string,string) arg forms (the latter being translated into the former by the JS helper code).

      This diff removes the dead code path and simplifies the C++/JS connector.

            Assignee:
            sara.golemon@mongodb.com Sara Golemon
            Reporter:
            sara.golemon@mongodb.com Sara Golemon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: