note 94254 added to function.imagecreatefromstring

From: Date: Sun, 25 Oct 2009 19:12:53 +0000
Subject: note 94254 added to function.imagecreatefromstring
Groups: php.notes 
Request: Send a blank email to php-notes+get-162086@lists.php.net to get a copy of this message
My site allows anonymous uploads to a web-accessible location (that will execute a script if it finds one). Naturally, I need to verify that only harmless content is accepted. I am expecting only images, so I use: <?php $im = $imagecreatefromstring($USERFILE); $valid = ($im != FALSE); imagedestroy($im); return $valid; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 144.118.57.102 ---- Manual Page -- http://www.php.net/manual/en/function.imagecreatefromstring.php Edit -- https://master.php.net/note/edit/94254 Del: integrated -- https://master.php.net/note/delete/94254/integrated Del: useless -- https://master.php.net/note/delete/94254/useless Del: bad code -- https://master.php.net/note/delete/94254/bad+code Del: spam -- https://master.php.net/note/delete/94254/spam Del: non-english -- https://master.php.net/note/delete/94254/non-english Del: in docs -- https://master.php.net/note/delete/94254/in+docs Del: other reasons-- https://master.php.net/note/delete/94254 Reject -- https://master.php.net/note/reject/94254 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#162086) next »