Re: Security Concerns with Uploaded Images:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/14/06, Nick Wilson <nick@xxxxxxxxxxxxxxxxxx> wrote:
Hi all,

are there any security concerns with uploaded images?

My thought is that it wouldnt be too hard to have some kind of script
masquerade as a gif file, and perhaps cause damage.

I cant find anyway to check a file really is a gif/png/jpg (i assume the
mimetype available in $_FILES could be spoofed).

I'd welcome any thoughts in general on this, but specifically if anyone
has experience/knowledge in this area and can point me in the right
direction.

Check the file extension and the mimetype, make sure they are both
valid.. or as someone else suggested, use getimagesize on it - if that
returns false or empty then it's not an image.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux