Skip to content
Merged
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f27364c
feat(DRIVERS-2922): loosen options parser restrictions
aditi-khare-mongoDB Aug 8, 2024
2385382
add test criteria
aditi-khare-mongoDB Aug 14, 2024
1873743
grammar fix
aditi-khare-mongoDB Aug 14, 2024
fbacddb
wording fix
aditi-khare-mongoDB Aug 15, 2024
b052a3a
temp commit - changing terminology
aditi-khare-mongoDB Aug 20, 2024
73f7dac
change terminology
aditi-khare-mongoDB Aug 20, 2024
726d576
update changelog
aditi-khare-mongoDB Aug 20, 2024
81f43da
add in prose test ref
aditi-khare-mongoDB Aug 20, 2024
d363089
add parent matching requirements
aditi-khare-mongoDB Aug 23, 2024
9144879
update changelod
aditi-khare-mongoDB Aug 23, 2024
da90490
added in new prose test requirements + fixed formatting
aditi-khare-mongoDB Sep 3, 2024
ff800b4
requested changes
aditi-khare-mongoDB Sep 3, 2024
b26afc2
requested changes 2
aditi-khare-mongoDB Sep 4, 2024
a029753
uniform formatting + fix typo
aditi-khare-mongoDB Sep 5, 2024
43785b2
team review requested changes
aditi-khare-mongoDB Sep 6, 2024
be32cbb
team review requested changes
aditi-khare-mongoDB Sep 6, 2024
cf83c95
team review requested changes 2
aditi-khare-mongoDB Sep 13, 2024
6d953e3
update deprecation comment
aditi-khare-mongoDB Sep 13, 2024
9db03a7
typo
aditi-khare-mongoDB Sep 13, 2024
c2d075c
Merge branch 'master' into drivers-2922/uri-validation
aditi-khare-mongoDB Sep 16, 2024
f4175e9
clarify subdomain
aditi-khare-mongoDB Sep 20, 2024
54a5555
add in Shanes test
aditi-khare-mongoDB Sep 23, 2024
0a90e7c
update changelog date
aditi-khare-mongoDB Sep 24, 2024
e1f6d67
add in specific cases
aditi-khare-mongoDB Sep 24, 2024
fbc8b29
fix test cases
aditi-khare-mongoDB Sep 24, 2024
d658107
fix tests
aditi-khare-mongoDB Sep 24, 2024
c4bb2b4
fix tests
aditi-khare-mongoDB Sep 24, 2024
63f99bb
grammar fix
aditi-khare-mongoDB Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ parse error and MUST NOT do DNS resolution or contact hosts.
It is an error to specify more than one host name in a connection string with the `mongodb+srv` protocol, and the driver
MUST raise a parse error and MUST NOT do DNS resolution or contact hosts.

A driver MUST verify that in addition to the `{hostname}`, the `{domainname}` consists of at least two parts: the domain
name, and a TLD. Drivers MUST raise an error and MUST NOT contact the DNS server to obtain SRV (or TXT records) if the
full URI does not consist of at least three parts.
In the case that an hostname does not have a `{hostname}` and a `{domainname}` (consisting of a domain name and a TLD) prior to DNS resolution, drivers MUST NOT throw an error.

If `mongodb+srv` is used, a driver MUST implicitly also enable TLS. Clients can turn this off by passing `tls=false` in
either the Connection String, or options passed in as parameters in code to the MongoClient constructor (or equivalent
Expand Down Expand Up @@ -200,11 +198,28 @@ mongodb://mongodb1.mongodb.com:27317,mongodb2.mongodb.com:27107/?ssl=true&replic

## Test Plan

### Spec Tests
See README.md in the accompanying [test directory](tests).

Additionally, see the `mongodb+srv` test `invalid-uris.yml` in the
[Connection String Spec tests](../connection-string/tests).

### Prose Tests
* Test #1: The driver should not throw an error when given a valid SRV record that only contains the name of the domain and the TLD.

* Stub external DNS resolution to always pass (ex: `dns.lookup`).

* Assert that creating a client with the uri `mongodb+srv//mongodb.localhost` does not cause an error.

* Assert that connecting the client to the server does not cause an error.

* Test #2: The driver should not throw an error when given a valid SRV record that only contains the TLD.
* Stub external DNS resolution to always pass (ex: `dns.lookup`).

* Assert that creating a client with the uri `mongodb+srv//localhost` does not cause an error.

* Assert that connecting the client to the server does not cause an error.

## Motivation

Several of our users have asked for this through tickets:
Expand Down