Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-934

Unable to specify ssl_match_hostname option using URI style connection string

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.0.3
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 21

      Description

      Using following URI

      mongodb://127.0.0.1:27017/db?replicaset=test&ssl=true&ssl_keyfile=/tmp/ssl.key&ssl_certfile=/tmp/ssl.cert&ssl_ca_certs=/tmp/ca.crt&ssl_match_hostname=false
      

      error:

        File "build/bdist.linux-x86_64/egg/pymongo/common.py", line 116, in validate_boolean
          raise TypeError("%s must be True or False" % (option,))
      TypeError: ssl_match_hostname must be True or False
      

      caused by https://github.com/mongodb/mongo-python-driver/blob/3.0.2/pymongo/common.py#L401

      validate_boolean_or_string validator should be used for option ssl_match_hostname

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: