Skip to content

Allow valid SRV hostnames with less than 3 parts - #1525

Merged
NathanQingyangXu merged 7 commits into
mainfrom
JAVA-5542
Oct 25, 2024
Merged

Allow valid SRV hostnames with less than 3 parts#1525
NathanQingyangXu merged 7 commits into
mainfrom
JAVA-5542

Conversation

@NathanQingyangXu

Copy link
Copy Markdown
Contributor

@NathanQingyangXu
NathanQingyangXu marked this pull request as ready for review October 7, 2024 20:23
@NathanQingyangXu
NathanQingyangXu requested review from a team and rozza and removed request for a team October 7, 2024 20:23
@NathanQingyangXu
NathanQingyangXu marked this pull request as draft October 7, 2024 21:17
@NathanQingyangXu
NathanQingyangXu removed the request for review from rozza October 7, 2024 21:17
@NathanQingyangXu
NathanQingyangXu force-pushed the JAVA-5542 branch 3 times, most recently from c3d2782 to 36811a2 Compare October 9, 2024 01:43
@NathanQingyangXu
NathanQingyangXu marked this pull request as ready for review October 9, 2024 04:31
@jyemin
jyemin requested review from katcharov and vbabanin and removed request for vbabanin October 9, 2024 11:50

@katcharov katcharov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just a few comments/questions.

Comment thread driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java Outdated
Comment thread driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java Outdated

@katcharov katcharov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

':' in between, as expected by ServerAddress.

It's required that the srvHost has at least three parts (e.g. foo.bar.baz) and that all of the resolved hosts have a parent
domain equal to the domain of the srvHost.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional since this is internal, but consider replacing this with the revised conditions.

@NathanQingyangXu
NathanQingyangXu merged commit fa7908e into main Oct 25, 2024
@NathanQingyangXu
NathanQingyangXu deleted the JAVA-5542 branch October 25, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants