Read a blocked_networks entry in the IPv4-mapped form as its IPv4 range (closes #301) #302

Merged
clawbot merged 2 commits from issue-301-mapped-blocked-networks into next 2026-10-19 03:00:44 +02:00
2 Commits
Author SHA1 Message Date
clawbot 11a6f5a60a Read a blocked_networks entry in the IPv4-mapped form as its IPv4 range (closes #301)
check / check (push) Waiting to run
The fetcher matches an IPv4-mapped address (::ffff:a.b.c.d) as the
IPv4 address it holds, so a blocked_networks entry written in that form
was accepted and matched nothing. Such an entry is now kept as the IPv4
range it covers: ::ffff:10.0.0.0/104 becomes 10.0.0.0/8. One shorter
than /96 covers more than IPv4 addresses and aborts startup naming the
setting. trusted_proxies shares the list parser and is unchanged.
README.md says both.

Model: opus-5-5
2026-10-19 00:31:43 +00:00
clawbot 9c47f11fd6 Test that a blocked_networks entry in the IPv4-mapped form is read as its IPv4 range
Two new tests, failing until the fix. Entries such as
::ffff:10.0.0.0/104 and ::ffff:0:0/96 must load as 10.0.0.0/8 and
0.0.0.0/0, since the fetcher matches an IPv4-mapped address as the IPv4
address it holds. An entry in that form shorter than /96, such as
::ffff:0:0/95, must abort startup naming blocked_networks.

Model: opus-5-5
2026-10-19 00:31:43 +00:00