FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Failed @getimagesize() print to error_log?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Failed @getimagesize() print to error_log? [message #173239 is a reply to message #173089] Tue, 29 March 2011 07:11 Go to previous message
Gordon Burditt is currently offline  Gordon Burditt
Messages: 2
Registered: March 2011
Karma:
Junior Member
>> Tell me, are you taking user input in some form and expecting it to match
>> the name of a thumbnail file on the server?
>>
>> If so, what controls are you placing on that user input to ensure that a
>> valid file name is requested?
>
> Not exactly. This section hosts local classifieds, so the user is
> uploading it via a Perl script, which verifies that it's a legitimate
> image, and renames the image to the ID of the listing (so it's always
> a number). Then, the image name is added to a database, which is then
> read when a site visitor views the ad.

In order to verify that something is a valid image, you need, at a
minimum, an antivirus program. There are a number of ways to
generate a malicious image intended to cause buffer overflows or
other nasty things in browsers. Whether or not it causes trouble
for PHP, you don't want to serve such images.

You may also need the MPAA image-rating program (if such a thing
exists) to ensure that you are not accepting pornographic images
for your classifieds. Unless, of course, it's for pornographic
classifieds.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PDO MySQL
Next Topic: Very strange behaviour of imageftbbox()?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Feb 17 16:46:03 GMT 2025

Total time taken to generate the page: 0.03511 seconds