From 14e10be1c4302b33cdc43ee00018ea78b618b6f2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 2 Aug 2012 00:16:56 +0200 Subject: [PATCH] privacy_image_cache: checking if the cached file really is an image --- privacy_image_cache/privacy_image_cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");