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

Only overwrite servername in tls connect when host is not an IP address #354

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

lukekarrys
Copy link
Collaborator

@lukekarrys lukekarrys commented Dec 6, 2024

This is an alternative to #337 (which was created to revert #312).

Based on the original report in #308, I think reverting is not ideal since it would (re-)break the use case described where Kubernetes issues certificates for hosts that area reachable by IP. (Kubernetes is not an area I have much experience in so this is reiterating the original report but I have not tested this.)

But I do think the end result of #337 is nice in that it removes the warning for a common use case. Regardless of Node showing a deprecation warning and RFC 6066, it would be nice not to show the warning since even the tests in this repo trigger the deprecation message.

I searched a bit and found an example of node-postres handling this same issue with a solution that accounts for both situations: brianc/node-postgres#1890

This PR copies that code into a helper function used in all places that net.isIP was used.

Closes #337.

Copy link

vercel bot commented Dec 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview Dec 6, 2024 8:20pm

Copy link

changeset-bot bot commented Dec 6, 2024

⚠️ No Changeset found

Latest commit: a254b78

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@lukekarrys
Copy link
Collaborator Author

@mxschmitt Can you confirm that this patch doesn't trigger the deprecation message when used in playwright's tests?

@lukekarrys lukekarrys merged commit 913a49a into main Dec 6, 2024
14 checks passed
@lukekarrys lukekarrys deleted the lk/servername-from-non-ip-host branch December 6, 2024 22:12
@mxschmitt
Copy link
Contributor

Thank you - works for us!

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