Repository navigation
tls: ignore a terminal dot when matching SNI contexts - #67639
Open
ShogunPanda wants to merge 1 commit into
Open
ShogunPanda wants to merge 1 commit into
ShogunPanda wants to merge 1 commit into
Conversation
Collaborator
|
Review requested:
|
The names given to `server.addContext()` and the server name sent by the client were compared as written, so `host.example.` did not match a context added for `host.example`, although both name the same host. Remove one terminal dot from both before matching, so that the same context is selected. Assisted-By: OpenAI GPT-5.6 Sol <openai/gpt-5.6-sol> Signed-off-by: Paolo Insogna <paolo@cowtech.it>
ShogunPanda
force-pushed
the
tls-sni-terminal-dot
branch
from
November 20, 2026 06:56
a6e9a38 to
2139721
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67639 +/- ##
==========================================
- Coverage 90.72% 90.72% -0.01%
==========================================
Files 801 801
Lines 280889 280918 +29
Branches 54240 54256 +16
==========================================
+ Hits 254829 254852 +23
- Misses 16245 16249 +4
- Partials 9815 9817 +2
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
server.addContext()and the SNI callback compared the names as written, so a client sendinghost.example.(with a terminal dot) did not match a context registered forhost.example, and vice versa, although both names refer to the same host. Remove one terminal dot from both sides before matching so the same context is selected.Testing: added
test/parallel/test-tls-sni-trailing-dot.js(TLSv1.2 and TLSv1.3, exact and wildcard names, with and without the terminal dot). Theparallel/test-tls-*andparallel/test-https-*suites and eslint pass.