From 4c827cf1059513aadf01c7f82284bc6ce4d0cd61 Mon Sep 17 00:00:00 2001 From: czaks Date: Thu, 5 May 2016 10:22:34 +0200 Subject: [PATCH] fix some nonsense --- post.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/post.php b/post.php index dc303785..b41b4b63 100644 --- a/post.php +++ b/post.php @@ -625,12 +625,14 @@ if (isset($_POST['delete'])) { if ($post['has_file']) { foreach ($post['files'] as $key => &$file) { - if ($file['is_an_image'] && $config['ie_mime_type_detection'] !== false) { - // Check IE MIME type detection XSS exploit - $buffer = file_get_contents($upload, null, null, null, 255); - if (preg_match($config['ie_mime_type_detection'], $buffer)) { - undoImage($post); - error($config['error']['mime_exploit']); + if ($file['is_an_image']) { + if ($config['ie_mime_type_detection'] !== false) { + // Check IE MIME type detection XSS exploit + $buffer = file_get_contents($upload, null, null, null, 255); + if (preg_match($config['ie_mime_type_detection'], $buffer)) { + undoImage($post); + error($config['error']['mime_exploit']); + } } require_once 'inc/image.php';