From 358bb659bc533bf6e7366e51592c9fce83ef298f Mon Sep 17 00:00:00 2001 From: pecesama Date: Thu, 23 Oct 2008 18:15:37 +0000 Subject: [PATCH] Patch for imgsize to allow only images --- classes/imgsize.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/classes/imgsize.php b/classes/imgsize.php index 87b5511..774eee0 100644 --- a/classes/imgsize.php +++ b/classes/imgsize.php @@ -29,6 +29,13 @@ Filename : imgsize.php */ $img = $_GET['img']; + +$ext=substr($img, -3); +if ($ext != "jpg" && $ext !="gif" && $ext !="png") { + die("This is not a valid image file!!"); +} + + $percent = $_GET['percent']; $constrain = $_GET['constrain']; $w = $_GET['w'];