Commit Graph
3 Commits
Author SHA1 Message Date
Dominik Schmidt f1afd72e31 fix(thumbnails): close rejected vips ref, map oversized convert error to forbidden
(cherry picked from commit 65f19b5d71)
2026-09-29 09:58:19 +02:00
Dominik Schmidt 5860aab875 fix(thumbnails): bound declared image dimensions before decoding
The imaging build decodes the full pixel buffer from the header-declared
dimensions before the existing MaxInputWidth/MaxInputHeight guard runs, so a
tiny crafted file whose header declares huge dimensions forces a multi-GB
allocation and can OOM the worker. Read the header with DecodeConfig and reject
oversized sources before the decode allocates, in both the imaging and vips
builds, and thread the limit through the audio cover-art and geogebra decoders
that decode a second attacker-controlled image.

(cherry picked from commit 7f687ea288)
2026-09-29 09:58:19 +02:00
Ralf Haferkamp a9a5570050 feat(thumbnails): optional libvips based thumbnail generation
Can be enabled by setting the 'enable_vips' tag on 'go build'
2024-10-17 14:05:27 +02:00