Re: Re: security of uploaded gif files

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

 



Hi, Gerry.

Gerry Danen wrote:
There's a couple of things a person can do.

1. check for .gif extention
2. see if exif_imagetype() returns type IMAGETYPE_GIF
3. see if getimagesize() returns reasonable values and not FALSE
4. check the file content for binary vs text content

It's enough to know whether it's an image and has a reasonable size. What if there is no .gif extension? Rename the file.

I think the last step makes no sense.

Regards.
--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.

--
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