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

fix: revert incorrect servername fix #1005

Merged
merged 1 commit into from
Aug 28, 2021

Conversation

szmarczak
Copy link
Member

@szmarczak szmarczak commented Aug 27, 2021

This reverts commit 2ee6e37 which incorrectly allowed IP server names.

Sorry for my mistake. Got confused by https://github.com/nodejs/node/blob/e5670f49682ced87451e5fc1e56d7d3fc396c6f2/lib/internal/http2/core.js#L623-L639 incorrectly returning https://false:443 for IP addresses. However, I did not investigate further. Per RFC6066:

Currently, the only server names supported are DNS hostnames;
[...]
"HostName" contains the fully qualified DNS hostname of the server
[...]
Literal IPv4 and IPv6 addresses are not permitted in "HostName".

Again I'm deeply sorry for my mistake.


Node.js also gives a warning when the servername is an IP address. I must've missed it somehow :(

@codecov-commenter
Copy link

codecov-commenter commented Aug 27, 2021

Codecov Report

Merging #1005 (2da32c0) into main (c57aac5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1005   +/-   ##
=======================================
  Coverage   94.03%   94.03%           
=======================================
  Files          37       37           
  Lines        3585     3589    +4     
=======================================
+ Hits         3371     3375    +4     
  Misses        214      214           
Impacted Files Coverage Δ
lib/core/util.js 99.10% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c57aac5...2da32c0. Read the comment docs.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 94ab02d into nodejs:main Aug 28, 2021
KhafraDev pushed a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
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