Re: verifying uploaded images
| From: | Rasmus Lerdorf | Date: | Mon, 24 Jul 2000 04:48:08 +0000 |
| Subject: | Re: verifying uploaded images | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7822@lists.php.net to get a copy of this message | ||
> I have a form so people can upload images, which are then displayed with
> any posts they make on the message board. Question is, is there a way
> to verify wether or not the image.jpg they uploaded is actually a jpeg
> and not another type of file renamed, and will it matter? Is there any
> way that a malicious script of some sort could be uploaded in that way
> and run?
It shouldn't really matter. But you can actually check the contents of
the file to see if it a image of some sort. See the
GetImageSize() function.
-Rasmus