mirror of
https://github.com/makeplane/plane.git
synced 2026-09-02 03:59:00 +02:00
isBlockedIPv6 matched raw string prefixes, so only the compressed spelling of an address was caught. Every expanded form of ::ffff:127.0.0.1 -- including the canonical 0:0:0:0:0:ffff:127.0.0.1 -- reached the fetcher, reopening the SSRF this guard exists to close. Expand to eight groups first, then judge: IPv4-mapped/compatible addresses delegate to the v4 rules, and the remaining ranges are matched numerically rather than by prefix. Unparseable literals are treated as unsafe. Reported by Copilot on #9540. Co-authored-by: Plane AI <noreply@plane.so>