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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.1.10
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Tom Hollander (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: