Files

16 lines
1.2 KiB
Plaintext

# ImageVerifier decisions (cap 8 MiB, 16,000,000 pixels, png/jpeg/webp)
input verdict detail
real PNG 64x48 ACCEPT image/png 64x48
real JPEG 64x48 ACCEPT image/jpeg 64x48
WebP header only (sniffed, not decoded) ACCEPT image/webp
SVG with a script REJECT not-an-image: no known image signature in the first bytes
HTML page REJECT not-an-image: no known image signature in the first bytes
PDF REJECT not-an-image: no known image signature in the first bytes
PNG signature + garbage REJECT undecodable: IIOException
valid PNG + 40 bytes of HTML appended ACCEPT image/png 16x16
PNG header claiming 40000x40000 REJECT too-many-pixels: 40000x40000 = 1600000000 > cap 16000000
GIF (sniffed but not on the allow list) REJECT type-not-allowed: image/gif
empty REJECT not-an-image: no known image signature in the first bytes
9 MB of PNG-looking zeros REJECT too-large: 9437184 bytes > cap 8388608