My only contribution to PHP thus far is the following bug report/feature
request (#18052):

getimagesize() blindly trusts the width and height specified in the header
of gifs. You can just hexedit the file and set the width and height to any
value and getimagesize() will believe that is the "true size" of the image.
Even worse - Internet Explorer ignores the width and height in the header
and thus it is possible to, for instance, upload a much larger image in an
upload form that uses getimagesize() than what is allowed. I believe
getimagesize() should just skip the header and read the size from the
beginning of the "Image Block".

I'd be glad to write a patch for image.c (function php_handle_gif()), but I
though I should ask you guys first. I wouldn't want to do it in vain. As it
is now I've got PHP code that checks this for me to prevent "malicious"
users from uploading huge avatars in my forum software.

/Rickard



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to