issue15, check for compatible image type
[phpfspot.git] / phpfspot_img.php
index 69f579bf20c04f32b16dc48228cf90ba3e8ce1d0..c21ff593c3e2be2e74f03f3cffc950f8d1b79486 100644 (file)
@@ -51,6 +51,11 @@ class PHPFSPOT_IMG {
       $tmp = getimagesize($fullpath);
       $mime = $tmp['mime'];
 
       $tmp = getimagesize($fullpath);
       $mime = $tmp['mime'];
 
+      if(!$this->parent->checkifImageSupported($mime)) {
+         $this->parent->showTextImage("Unsupported Image Type");
+         return;
+      }
+
       Header("Content-Type: ". $mime);
       Header("Content-Length: ". filesize($fullpath));
       Header("Content-Transfer-Encoding: binary\n");              
       Header("Content-Type: ". $mime);
       Header("Content-Length: ". filesize($fullpath));
       Header("Content-Transfer-Encoding: binary\n");