Skip to content
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

HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier #203

Merged
merged 2 commits into from
Jan 29, 2020

Conversation

ok2c
Copy link
Member

@ok2c ok2c commented Jan 25, 2020

No description provided.

@ok2c ok2c requested review from michael-o and rschmitt January 25, 2020 15:11
ok2c referenced this pull request Jan 25, 2020
This change ensures that during hostname verification the public suffix
list is only used to prevent wildcard matching against entire TLDs (e.g.
`*.com`). Currently, private domains are also being matched against,
which is preventing reasonable wildcards (such as
`*.s3.eu-central-1.amazonaws.com`) from being respected.
publicSuffixMatcher);
DefaultHostnameVerifier.matchDNSName(
"hostname-workspace-1.ops.domain.local",
Collections.singletonList(SubjectName.DNS("hostname-workspace-1.ops.domain.local")),
Copy link
Member

Choose a reason for hiding this comment

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

Call me stupid, but this list does not include the .local domain and according to RFC 6762, section 3 this hostname is invalid. only a single DNS label is allowed in the .local domain.

Copy link
Member Author

Choose a reason for hiding this comment

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

@michael-o I am not sure I understand your objection. The domain name in question might well be invalid but the matching logic should still work, should not it?

Copy link
Member

@michael-o michael-o Jan 26, 2020

Choose a reason for hiding this comment

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

I agree that the matching logic should work, but I don't think we should use something forbidden in our tests. hostname-workspace-1-ops.local should do, shouldn't it for the tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

@michael-o Sure. That I can do.

…rejection of certs with non-standard domains.

This reverts commit e0416f0
@ok2c ok2c merged commit 736c00d into apache:4.5.x Jan 29, 2020
@ok2c ok2c deleted the HTTPCLIENT-2047 branch January 29, 2020 08:36
@l3ender
Copy link

l3ender commented Feb 27, 2020

I see this is targeted for 4.5.12--is there a release in process for that version yet? If there is anything I can do to help please let me know.

@ok2c
Copy link
Member Author

ok2c commented Feb 28, 2020

@l3ender I will try to get around to next week.

tvernum added a commit to tvernum/elasticsearch that referenced this pull request Jun 16, 2022
Since apache/httpcomponents-client#203
httpclient handles private suffix rules differently.

This change updates RegisteredDomainProcessorTests to reflect those
new rules
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.

3 participants