]> git.mxchange.org Git - friendica-addons.git/commitdiff
privacy_image_cache: checking if the cached file really is an image
authorMichael Vogel <icarus@dabo.de>
Wed, 1 Aug 2012 22:16:56 +0000 (00:16 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 1 Aug 2012 22:16:56 +0000 (00:16 +0200)
privacy_image_cache/privacy_image_cache.php

index 2309ff22e91e5c23563dbf58a6fa2e5e16048b5c..8c68ef9a4bf555a3b7f2d92151c8cdfa363c7594 100644 (file)
@@ -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");