GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: reject hostnames with forbidden code points by mcollina · Pull Request #67254 · nodejs/node

Conversation

@mcollina

@mcollina mcollina commented Nov 4, 2026

Copy link
Copy Markdown
Member

domainToASCII() is implemented with the URL host parser, which stops at
path, query and fragment delimiters and percent-decodes. Passing a hostname
through it can therefore silently shorten the name, so checkServerIdentity()
validates a certificate against a host the application never asked for: name
resolution and SNI use the original string, while the certificate is matched
after normalization.

Reject hostnames containing a WHATWG forbidden host code point before matching.
None of these code points is valid in a DNS hostname, so failing closed is
safe.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mcollina
tls: reject hostnames with forbidden code points
2fd1f0b
domainToASCII() is implemented with the URL host parser, which stops at
path, query and fragment delimiters and percent-decodes. Passing a
hostname through it can therefore silently shorten the name, so
checkServerIdentity() validates a certificate against a host the
application never asked for: name resolution and SNI use the original
string, while the certificate is matched after normalization. Reject
hostnames containing a WHATWG forbidden host code point before matching.
None of these code points is valid in a DNS hostname, so failing closed
is safe.

Signed-off-by: Matteo Collina <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/net
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem. labels Nov 4, 2026
@codecov

codecov Bot commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.68%. Comparing base (98dbf60) to head (2fd1f0b).
⚠️ Report is 155 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67254      +/-   ##
==========================================
+ Coverage   90.65%   90.68%   +0.02%     
==========================================
  Files         797      797              
  Lines      278268   279389    +1121     
  Branches    53517    53749     +232     
==========================================
+ Hits       252261   253360    +1099     
+ Misses      16386    16305      -81     
- Partials     9621     9724     +103     
Files with missing lines Coverage Δ
lib/tls.js 93.86% <100.00%> (+0.26%) ⬆️

... and 71 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ronag
ronag approved these changes Nov 8, 2026
View reviewed changes
@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 9, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 9, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78916/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

panva
panva approved these changes Nov 9, 2026
View reviewed changes
@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Nov 9, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 9aa379e into nodejs:main Nov 9, 2026
79 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Landed in 9aa379e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 9, 2026
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@mcollina @aduh95
tls: reject hostnames with forbidden code points
40764cf
domainToASCII() is implemented with the URL host parser, which stops at
path, query and fragment delimiters and percent-decodes. Passing a
hostname through it can therefore silently shorten the name, so
checkServerIdentity() validates a certificate against a host the
application never asked for: name resolution and SNI use the original
string, while the certificate is matched after normalization. Reject
hostnames containing a WHATWG forbidden host code point before matching.
None of these code points is valid in a DNS hostname, so failing closed
is safe.

Signed-off-by: Matteo Collina <[email protected]>
PR-URL: #67254
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026
2026-11-12, Version 27.0.0-alpha.0.1.0 (Alpha) #67415
Merged
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@mcollina @aduh95
tls: reject hostnames with forbidden code points
2d7b0e2
domainToASCII() is implemented with the URL host parser, which stops at
path, query and fragment delimiters and percent-decodes. Passing a
hostname through it can therefore silently shorten the name, so
checkServerIdentity() validates a certificate against a host the
application never asked for: name resolution and SNI use the original
string, while the certificate is matched after normalization. Reject
hostnames containing a WHATWG forbidden host code point before matching.
None of these code points is valid in a DNS hostname, so failing closed
is safe.

Signed-off-by: Matteo Collina <[email protected]>
PR-URL: #67254
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@mcollina @aduh95
tls: reject hostnames with forbidden code points
3a85380
domainToASCII() is implemented with the URL host parser, which stops at
path, query and fragment delimiters and percent-decodes. Passing a
hostname through it can therefore silently shorten the name, so
checkServerIdentity() validates a certificate against a host the
application never asked for: name resolution and SNI use the original
string, while the certificate is matched after normalization. Reject
hostnames containing a WHATWG forbidden host code point before matching.
None of these code points is valid in a DNS hostname, so failing closed
is safe.

Signed-off-by: Matteo Collina <[email protected]>
PR-URL: #67254
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 13, 2026
@mcollina @aduh95
tls: reject hostnames with forbidden code points
3a7e1ad
domainToASCII() is implemented with the URL host parser, which stops at
path, query and fragment delimiters and percent-decodes. Passing a
hostname through it can therefore silently shorten the name, so
checkServerIdentity() validates a certificate against a host the
application never asked for: name resolution and SNI use the original
string, while the certificate is matched after normalization. Reject
hostnames containing a WHATWG forbidden host code point before matching.
None of these code points is valid in a DNS hostname, so failing closed
is safe.

Signed-off-by: Matteo Collina <[email protected]>
PR-URL: #67254
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
This was referenced Nov 20, 2026
2026-11-30, Version 24.23.0 'Krypton' (LTS) #67663
Open
2026-11-30, Version 26.14.0 'Lithium' (LTS) #67664
Open
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@mcollina @gabylb
tls: reject hostnames with forbidden code points
26c5240
domainToASCII() is implemented with the URL host parser, which stops at
path, query and fragment delimiters and percent-decodes. Passing a
hostname through it can therefore silently shorten the name, so
checkServerIdentity() validates a certificate against a host the
application never asked for: name resolution and SNI use the original
string, while the certificate is matched after normalization. Reject
hostnames containing a WHATWG forbidden host code point before matching.
None of these code points is valid in a DNS hostname, so failing closed
is safe.

Signed-off-by: Matteo Collina <[email protected]>
PR-URL: nodejs#67254
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@panva panva panva approved these changes
@ronag ronag ronag approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mcollina @nodejs-github-bot @panva @ronag
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.