Commit 76fff29
authored
fix(target-url): treat trailing-dot hostnames as loopback in SSRF guard (#37)
assertNotLocal lowercased the hostname but did not strip a trailing dot, so http://localhost. (the FQDN form of localhost, RFC 6761) and http://localhost%2e bypassed the host === 'localhost' loopback check. IP literals are already dot-normalized by the WHATWG URL parser, so only named hosts were affected. Strips one trailing dot before the comparison. Adds 4 regression tests (3 blocked variants + 1 public-FQDN no-false-positive).1 parent 7b7d80d commit 76fff29
0 file changed
0 commit comments