mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
validateImageBuffer catches corrupt image data before processing reaches the tool handler, so the correct status code is 400 (bad request) rather than 422 (processing failure). Also fix SVGZ watermark validation by returning early for compressed SVG (Sharp cannot read gzip-compressed SVGZ directly) and passing the actual watermark filename to validateImageBuffer for correct format detection.