X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot_img.php;h=052a45f4099c686bdc0cd561cf482ce6ee8ded90;hp=69f579bf20c04f32b16dc48228cf90ba3e8ce1d0;hb=583a68ff5ba655aeb17e3f09a5945aa735b91774;hpb=cb4b29076f41be249d2f4b54204085722ef6beff diff --git a/phpfspot_img.php b/phpfspot_img.php index 69f579b..052a45f 100644 --- a/phpfspot_img.php +++ b/phpfspot_img.php @@ -40,7 +40,7 @@ class PHPFSPOT_IMG { } if(!file_exists($fullpath)) { - $this->parent->showTextImage("test1"); + $this->parent->showTextImage("File ". $fullpath ." does not exist"); return; } if(!is_readable($fullpath)) { @@ -51,6 +51,11 @@ class PHPFSPOT_IMG { $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");