Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1588

Need to double-URI-encode username/password with mongodb+srv:// protocol

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.10
    • Affects Version/s: None
    • Component/s: None
    • None

      Scenario: Connecting with the Node driver using SCRAM authentication where the password contains a character that needs to be encoded, e.g. @ -> %40

      When using the mongodb:// protocol, you can connect with a single level of URI encoding, e.g.: "mongodb://user:myP%40ssword@host/".

      When using the mongodb+srv:// protocol and use a single level of URI encoding, e.g: "mongodb+srv://user:myP%40ssword@host/" you get the error:

      Error: Username containing an unescaped at-sign

      You can get past this by double-URI-encoding the password, e.g: "mongodb+srv://user:myP%2540ssword@host/"

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            tom.hollander@mongodb.com Tom Hollander
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: