Patch for imgsize to allow only images

master
pecesama 2008-10-23 18:15:37 +00:00
parent 0d1341a930
commit 358bb659bc
1 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,13 @@ Filename : imgsize.php
*/ */
$img = $_GET['img']; $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']; $percent = $_GET['percent'];
$constrain = $_GET['constrain']; $constrain = $_GET['constrain'];
$w = $_GET['w']; $w = $_GET['w'];