Re: Re: Security Concerns with Uploaded Images:
| From: | Richard Lynch | Date: | Tue, 23 May 2006 21:30:32 +0000 |
| Subject: | Re: Re: Security Concerns with Uploaded Images: | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236762@lists.php.net to get a copy of this message | ||
On Tue, May 23, 2006 3:45 am, Rory Browne wrote:
>> Use the unix command "file" to determiner what file you have.
>> I have had the same problem...
>
> Don't depend on it.
http://php.net/getimagesize
would be slightly better, as it tries to dig out width/height and
number of colors for any given format, plus other fun stuff for some
formats.
So they'd have to hack MORE of a file and make it look kosher enough
to fool that...
You STILL ought to put the images OUTSIDE the webtree and use PHP to
readfile them so they can never get executed by remote visitor, imho.
--
Like Music?
http://l-i-e.com/artists.htm