From 02740d840a70025836497d9e1599eda69766a36f Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sat, 17 May 2014 22:59:28 +0200 Subject: [PATCH] Prevent unsupported files from being moved (#151) --- php/modules/Import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/modules/Import.php b/php/modules/Import.php index 5825f98..3dfa3c1 100644 --- a/php/modules/Import.php +++ b/php/modules/Import.php @@ -82,8 +82,8 @@ class Import extends Module { foreach ($files as $file) { - # Prevent index.html from being moved - if (basename($file)==='index.html') continue; + # Prevent unsupported files from being moved + if (is_dir($file)===false&&@exif_imagetype($file)===false) continue; $out = ''; $ret = '';