Fetch an IPv6 source host written without a port (closes #295) #296

Merged
clawbot merged 2 commits from issue-295-ipv6-host-without-port into next 2026-10-16 05:00:47 +02:00
2 Commits
Author SHA1 Message Date
sneak 6f50eb20df Fetch an IPv6 source host written without a port (closes #295)
check / check (push) Waiting to run
The fetcher's check of a source URL cut a port off the host with
net.SplitHostPort, which fails when an IPv6 address in brackets has no
port, so the brackets stayed on, the name lookup failed and the request
answered 500. The check now parses the URL and takes the host from
Hostname(), which drops the brackets with or without a port, so the
address is looked up and a private one is refused with 403.

Model: opus-5-5
2026-10-16 02:49:55 +00:00
sneak 1aacf6cbf6 Test that both image routes fetch an IPv6 source host without a port
A router test against a test upstream that records each request: an
IPv6 source host written with and without a port, through a /v1/image/
URL with a signature and through an encrypted URL. A public address must
be fetched, a private one refused with 403 without reaching the
upstream. The cases without a port fail: each answers 500.

Model: opus-5-5
2026-10-16 02:49:36 +00:00