Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2187

Key file path, key file password, and certificate authority file path must be escaped in MongoDB URI

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • 1.7.0
    • 1.7.0
    • None
    • None

    Description

      Allowing an unescaped "/" or other special character in the key file path, key file password, or the certificate authority file path introduces a parsing ambiguity. It violates the Connection String Spec's algorithm, which requires a driver to parse hostnames and user info from the URI segment before the last "/" character, and requires the driver to parse the options from the segment after the last "/" character. Thus we can't correctly parse a URI like this without violating the spec:

      "mongodb://server/?sslclientcertificatekeyfile=/tmp/key.pem"

      We can't parse that string while conforming to the spec, because the segment before the last "/" character is this:

      "mongodb://server/?sslclientcertificatekeyfile=/tmp"

      Instead, we must require this syntax:

      "mongodb://server/?sslclientcertificatekeyfile=%2Ftmp%2Fkey.pem"

      Attachments

        Issue Links

          Activity

            People

              jesse@mongodb.com A. Jesse Jiryu Davis
              jesse@mongodb.com A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: