test_urls_reachable.py probes every literal URL and fails hard on one it cannot parse, and http://a..b/m.jpg in the malformed-media-host tests of test_service.py and test_web.py is unparsable on purpose (PR 2951 run 45676116645, LocationParseError). Both lines carry the repository's per-line nocheck url marker.
🎯 Fix: 97 %
💥 Break: 1 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 96
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pillow's PNG plugin accepts a file in Image.open and raises SyntaxError from the lazy decode in convert() when a chunk after an empty IDAT has an invalid identifier. That escaped to_jpeg, deliver and deliver_due, so the row was never updated and the crossposter crash-looped on it. SyntaxError now joins the errors to_jpeg turns into the permanent RefusedError; test_an_image_that_breaks_while_decoding_fails_for_good feeds such a PNG and expects the row dead-lettered. Addresses CodeRabbit comment 4698819926 on PR 2951.
🎯 Fix: 97 %
💥 Break: 1 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 96
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Media URLs come from posts and were fetched with urllib's default opener: any scheme it supports, environment proxies, redirects that kept the route token, and every address the name resolved to, so a post could make the crossposter read seaweedfs (filer without JWT), prometheus or cloud metadata and republish the bytes. web.py now resolves each host once and connects to the checked address. Media downloads refuse every address that is not globally routable (IPv4-mapped IPv6 unwrapped) plus multicast. API calls keep a loopback, link-local, unspecified, multicast and 0.0.0.0/8 guard, and refuse a redirect to another host. Only http and https URLs with a host and a valid port are fetched, on every redirect hop. Authorization, Proxy-Authorization and Cookie are dropped on a redirect to another origin, and environment proxies are ignored. A refusal is a permanent 400. service.py names stored media media-<index><ext> instead of the remote filename, maps read and OS errors to RequestError, and turns an unreadable image, a decompression bomb or one over 4096x4096 pixels (the 256m memory limit) into a permanent refusal instead of an exception that crash-looped deliver. MEDUSA WEB-SSRF accepted as false positives: web.py:210 (the guarded Request sink) and web.py:27 (the 0.0.0.0/8 refuse-list entry).
🎯 Fix: 92 %
💥 Break: 4 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 88
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>