Re:A file that's both an acceptable HTML page and a JPEG (vi...
by lucb1e on Saturday July 07, 2012 @05:32PM
(#4212794)
Checking a filename may leave bugs to exploit. It's quite unlikely, but why break your head over a possible way to exploit your validation when you can just rename the file to something of your liking? Check the file for a png, jpg, etc. header, append that as extension (erroring when none was found), and done; no risk of it being executed.
[ Parent
| on HN ]
There are no comments on this comment yet.