aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fixtures/simple.eml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-08 15:25:22 +0200
committerDanilo M. <danix@danix.xyz>2026-09-08 15:25:22 +0200
commit294009014d74a883112f13dbf48b7403ca79b012 (patch)
tree42886672fbace6db95ef1c555facec3813e93212 /tests/fixtures/simple.eml
parent244c36c820b135c39c3d58e10939496b57c845f5 (diff)
downloadabusectl-294009014d74a883112f13dbf48b7403ca79b012.tar.gz
abusectl-294009014d74a883112f13dbf48b7403ca79b012.zip
fix: re-bracket an IPv6 host when stripping URL userinfo
parts.hostname returns an IPv6 literal WITHOUT its brackets (2001:db8::1, not [2001:db8::1]), and _netloc_without_userinfo reassembled f"{host}:{port}" directly from it: redact.url("http://victim@[2001:db8::1]:8080/p?x=1") -> "http://2001:db8::1:8080/p?x=REDACTED" That string is not parseable back into a host and a port, and the digits after the second-to-last colon are not even part of the address any more. Reporting it means the abuse desk cannot identify the host at all, or misreads it, which is the same class of harm as reporting a wrong IP outright. _netloc_without_userinfo re-adds brackets whenever the hostname contains ":", so an IPv6 host now survives userinfo stripping exactly as an IPv4 or named host already did. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KphFXTc2QajxXsHWyvGJ4R
Diffstat (limited to 'tests/fixtures/simple.eml')
0 files changed, 0 insertions, 0 deletions