Re:An XSS on Facebook via PNGs and Wonky Content Types
by krapp on Wednesday March 16, 2016 @10:59PM
(#11302315)
> If a user uploads a PNG (or whatever), and you've validated it for that content type, don't serve it from your servers with a different content type.
I can see changing the suffix for image types and converting the image on the fly - I don't know why that would be useful, but I can imagine someone doing that. But at the very least don't allow sending something you know to be an image with non-image headers.
I can see changing the suffix for image types and converting the image on the fly - I don't know why that would be useful, but I can imagine someone doing that. But at the very least don't allow sending something you know to be an image with non-image headers.