Hi,
I'm using the PHP Thumbnailer Class(http://www.gen-x-design.com/projects...bnailer-class/) on one of my web sites.
However, I wonder if there is a vulnerability in the code.
It works like show_image.php?filename=http://www.mysite.com/bigimage.jpgPHP Code:?php
/**
* show_image.php
*
* Example utility file for dynamically displaying images
*
* @author Ian Selby
* @version 1.0 (php 4 version)
*/
//reference thumbnail class
include_once('thumbnail.inc.php');
$thumb = new Thumbnail($_GET['filename']);
//$thumb->resize($_GET['width'],$_GET['height']);
$thumb->resize(150,150);
$thumb->cropFromCenter(111);
$thumb->show();
$thumb->destruct();
exit;
?>
However, is this part secure?
If not, how would I best fix this so it only accepts files on my server?PHP Code:$thumb = new Thumbnail($_GET['filename']);
It doesn't seem to filter or santise my $_GET value.
Many thanks for your thoughts.





Bookmarks