Ways to stop people from uploading GIFs with injections in them?
问题 I have a PHP website where people can fill out help-tickets. It allows them to upload screenshots for their ticket. I allow gif, psd, bmp, jpg, png, tif to be uploaded. Upon receiving the upload, the PHP script ignores the file extension. It identifies the filetype using only the MIME information, which for these filetypes is always stored within the first 12 bytes of the file. Someone uploaded several GIFs, which when viewed with a browser, the browser said it was invalid, and my virus