-
Notifications
You must be signed in to change notification settings - Fork 906
GODRIVER-3284 Allow valid SRV hostnames with less than 3 parts. #1898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
API Change Report./v2/mongo/optionsincompatible changes(*ClientOptionsBuilder).SetDriverInfo: removed ./v2/x/mongo/driver/authincompatible changesHandshakeOptions.OuterLibraryName: removed ./v2/x/mongo/driver/operationincompatible changes(*Distinct).Hint: removed ./v2/x/mongo/driver/topologyincompatible changesWithOuterLibraryName: removed |
x/mongo/driver/dns/dns.go
Outdated
if len(separatedRecord) < 2 { | ||
return errors.New("DNS name must contain at least 2 labels") | ||
if l := len(separatedInputDomain); l < 3 && len(separatedRecord) <= l { | ||
return fmt.Errorf("DNS name must contain at least %d labels", l+1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error is sort of ambiguous to me. What are your thoughts on matching what node.js does? https://github.com/mongodb/node-mongodb-native/pull/4197/files#diff-39b2554fd18da165b59a6351b1aafff3714e2a80c1435f2de9706355b4d32351R1181
fmt.Errorf(Server record (%d) does not have at least one more domain level than parent URI (%d), l, len(seperatedRecord))
drivers-pr-bot please backport to release/2.0 |
(cherry picked from commit 9afdc8c)
… [release/2.0] (#1949) Co-authored-by: Qingyang Hu <[email protected]>
* release/2.0: BUMP v2.0.1 GODRIVER-3477 Bump golang.org/x/crypto from 0.29.0 to 0.31.0 [release/2.0] (#1952) GODRIVER-3284 Allow valid SRV hostnames with less than 3 parts. (#1898) [release/2.0] (#1949) GODRIVER-3452 MergeClientOptions returns object when given nil arguments (#1917) [release/2.0] (#1948) GODRIVER-3443 Remove internal APIs in migration guide. (#1911) [release/2.0] (#1951) GODRIVER-3470 Correct BSON unmarshaling logic for null values (#1924) [master] (#1945) [release/2.0] (#1947) Fix erroneous nil error return in FindOne. (#1926) [release/2.0] (#1944) GODRIVER-3298 Handle joined errors correctly in WithTransaction. (#1928) [release/2.0] (#1931) GODRIVER-3307 clone returned byte slice in MarshalValue (#1913) [release/2.0] (#1921)
GODRIVER-3284
Summary
Allow valid SRV hostnames with less than 3 parts.
Background & Motivation