diff options
| author | czaks <marcin@6irc.net> | 2016-05-05 10:22:34 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-05 10:22:34 +0200 |
| commit | 4c827cf1059513aadf01c7f82284bc6ce4d0cd61 (patch) | |
| tree | 414908c47e3ff6a9c3f260df0d84a9a5d531edc2 /post.php | |
| parent | c4b98e94cee5cb6bf89aea8dc36253ce754c6dcd (diff) | |
fix some nonsense
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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'; |
