Refuse SVG at the fetcher and never save an unknown input as JPEG (closes #68)
check / check (push) Waiting to run

The fetcher no longer accepts image/svg+xml, so an SVG source gets the
refusal every unaccepted upstream type gets, which both image routes now
answer with 415 where they answered 500. orig of an input the processor
cannot name is ErrUnsupportedInputFormat, also answered 415, where it
was saved as JPEG. README.md drops SVG from the source formats and lists
the 415.

Model: opus-5-5
This commit is contained in:
2026-10-13 02:19:41 +00:00
parent c5f318033d
commit 06e537c458
6 changed files with 53 additions and 19 deletions
+10
View File
@@ -30,6 +30,16 @@ P2: security: per-origin rate limiting
# Completed Steps
- 2026-10-13 SVG sources are refused, and `orig` is never saved as JPEG in place
of the source's own format (closes #68): the upstream fetch no longer accepts
`image/svg+xml`, which libvips would render. Both image routes answer 415 for
an upstream `Content-Type` that is not one of the source formats, SVG
included, where they answered 500. `orig` of a source in a format the image
processor cannot name is `ErrUnsupportedInputFormat`, also answered 415, where
it was saved as JPEG. `README.md` no longer lists SVG. The SVG detection in
`internal/magic` stays: the request path does not call it, and it goes with
the unused code of https://git.eeqj.de/sneak/pixa/issues/168. An SVG sent
under another image type still fails the first-bytes check and answers 500.
- 2026-10-12 per-client limit on the image routes (closes #236): the new setting
`image_requests_per_minute` (`PIXA_IMAGE_REQUESTS_PER_MINUTE`), default 600,
is how many `GET` and `HEAD` requests one client may send to `/v1/image/` and