Re: Re: security of uploaded gif files
| From: | Gustavo Narea | Date: | Tue, 24 Jan 2006 00:15:03 +0000 |
| Subject: | Re: Re: security of uploaded gif files | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229141@lists.php.net to get a copy of this message | ||
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 contentIt'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.