Files
node/test/parallel
Matteo Collina 3a85380c63 tls: reject hostnames with forbidden code points
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 <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67254
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-12 18:00:41 +01:00
..
2026-09-29 00:25:12 +02:00
2026-11-12 17:45:23 +01:00
2026-11-12 17:45:16 +01:00
2026-11-12 17:45:16 +01:00
2026-11-12 17:45:16 +01:00
2026-11-12 17:45:16 +01:00
2026-11-12 17:45:19 +01:00