Tech
Reject Image Polyglots After EXIF Removal, Before They Reach Your CDN
Removing EXIF GPS protects one privacy boundary. It does not prove that an uploaded JPEG contains only a JPEG.
A useful hostile fixture is a valid image followed by bytes for another format. Many decoders stop at JPEG’s end marker and display the picture successfully, while downstream scanners, content sniffers, or accidental downloads may interpret the trailing payload differently.
Build a fixture set rather than trusting extensions:
clean.jpg valid JPEG
exif-gps....
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to