From: Michael Vogel Date: Wed, 1 Aug 2012 22:16:56 +0000 (+0200) Subject: privacy_image_cache: checking if the cached file really is an image X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14e10be1c4302b33cdc43ee00018ea78b618b6f2;p=friendica-addons.git privacy_image_cache: checking if the cached file really is an image --- diff --git a/privacy_image_cache/privacy_image_cache.php b/privacy_image_cache/privacy_image_cache.php index 2309ff22..8c68ef9a 100644 --- a/privacy_image_cache/privacy_image_cache.php +++ b/privacy_image_cache/privacy_image_cache.php @@ -137,7 +137,7 @@ function privacy_image_cache_init() { } // Writing in cachefile - if (isset($cachefile) && $cachefile != '') + if (isset($cachefile) && ($cachefile != '') and (exif_imagetype($cachefile) > 0)) file_put_contents($cachefile, $img_str); header("Content-type: $mime");