forked from friendica/friendica-addons
privacy_image_cache: checking if the cached file really is an image
This commit is contained in:
parent
d33c565745
commit
14e10be1c4
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ function privacy_image_cache_init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Writing in cachefile
|
// Writing in cachefile
|
||||||
if (isset($cachefile) && $cachefile != '')
|
if (isset($cachefile) && ($cachefile != '') and (exif_imagetype($cachefile) > 0))
|
||||||
file_put_contents($cachefile, $img_str);
|
file_put_contents($cachefile, $img_str);
|
||||||
|
|
||||||
header("Content-type: $mime");
|
header("Content-type: $mime");
|
||||||
|
|
Loading…
Reference in a new issue