Ver código fonte

Patch for imgsize to allow only images

pecesama 15 anos atrás
pai
commit
358bb659bc
1 arquivos alterados com 7 adições e 0 exclusões
  1. 7 0
      classes/imgsize.php

+ 7 - 0
classes/imgsize.php Ver arquivo

@@ -29,6 +29,13 @@ Filename : imgsize.php
29 29
 */
30 30
 
31 31
 $img = $_GET['img'];
32
+
33
+$ext=substr($img, -3);
34
+if ($ext != "jpg" && $ext !="gif" && $ext !="png") {
35
+	die("This is not a valid image file!!");
36
+}
37
+
38
+
32 39
 $percent = $_GET['percent'];
33 40
 $constrain = $_GET['constrain'];
34 41
 $w = $_GET['w'];