Skip to content

fix: req.subdomains should not split a dotted IPv6 host - #7556

Closed
johnhldiver-beep wants to merge 2 commits into
expressjs:masterfrom
johnhldiver-beep:fix/issue-7532-subdomains-ipv6
Closed

johnhldiver-beep wants to merge 2 commits into
expressjs:masterfrom
johnhldiver-beep:fix/issue-7532-subdomains-ipv6

Conversation

@johnhldiver-beep

Copy link
Copy Markdown

Fixes #7532.

req.subdomains used net.isIP on the bracketed hostname, so a dotted IPv6 address like [::ffff:127.0.0.1] was split on dots.

Strip brackets before the isIP check; IP hosts keep returning [hostname].

Tests: req.subdomains suite 11 passing before, 15 passing after (4 new), full suite passing +4 with failing count unchanged at 60, lint clean.

@krzysdz

krzysdz commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Duplicate of #7533

@krzysdz krzysdz marked this as a duplicate of #7533 Oct 24, 2026
@krzysdz krzysdz closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

req.subdomains splits an IPv6 host that contains dots

2 participants