-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix HTTP::Client
certificate validation error on FQDN (host with trailing dot)
#12778
Fix HTTP::Client
certificate validation error on FQDN (host with trailing dot)
#12778
Conversation
a757248
to
5e69f8d
Compare
Co-authored-by: Quinton Miller <[email protected]>
I've applied @HertzDevil 's suggested change. Are there any other changes desired before this can be merged? If it helps, to clarify my urgency / security implications / technical use-case, I'd like to use this in production as I'm adding an HTTP endpoint uptime & latency monitoring feature to my on-call rotations / monitoring / alerting SaaS. I prefer to always use a fully-qualified domain when connecting to any customer-specified endpoints so that I can be sure that the user-specified URLs aren't inadvertently (or maliciously) probing my internal infrastructure. (Obviously I also need to disallow known internal hosts, |
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.
Thanks!
@compumike This is off topic, but considering FQDN resulution as a security mechanism sounds concerning to me. I'm not too deep into this topic, but I could spot some potential loopholes. |
@straight-shoota I greatly appreciate the way you think 😄 -- will consider that suggestion and consider other ways of restricting the reach of user-provided URLs at both the DNS level and the IP level. Thank you! |
HTTP::Client
certificate validation error on FQDN (host with trailing dot)
…ailing dot) (crystal-lang#12778) Co-authored-by: Quinton Miller <[email protected]>
Fixes #12777
I have tested this change and it works for me.
The test I added to
spec/manual/https_client_spec.cr
fails without this change, and passes with it.