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

srv URLs ignore tls=

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker - P1
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: None
    • Labels:
      None
    • Documentation Changes:
      Not Needed

      Description

      What problem are you facing?

      In https://github.com/mongodb/node-mongodb-native/blob/356fa9bf776447dce3614b7b3d6b30c0998aa512/src/connection_string.ts#L232-L236, tls is set to true unconditionally. Since options object options take preference over URL options, it is impossible to set tls=false or ssl=false using the URL, even though it should be possible to do so.

      What driver and relevant dependency versions are you using?

      4.0.0-beta.6

      Steps to reproduce?

      Connect to a mongodb server with TLS disabled using a mongodb+srv:// URL and tls=false.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              neal.beeken Neal Beeken
              Reporter:
              anna.henningsen Anna Henningsen
              Implementer:
              Anna Henningsen Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: