1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

fix some nonsense

This commit is contained in:
czaks 2016-05-05 10:22:34 +02:00
parent c4b98e94ce
commit 4c827cf105

View File

@ -625,12 +625,14 @@ if (isset($_POST['delete'])) {
if ($post['has_file']) { if ($post['has_file']) {
foreach ($post['files'] as $key => &$file) { foreach ($post['files'] as $key => &$file) {
if ($file['is_an_image'] && $config['ie_mime_type_detection'] !== false) { if ($file['is_an_image']) {
// Check IE MIME type detection XSS exploit if ($config['ie_mime_type_detection'] !== false) {
$buffer = file_get_contents($upload, null, null, null, 255); // Check IE MIME type detection XSS exploit
if (preg_match($config['ie_mime_type_detection'], $buffer)) { $buffer = file_get_contents($upload, null, null, null, 255);
undoImage($post); if (preg_match($config['ie_mime_type_detection'], $buffer)) {
error($config['error']['mime_exploit']); undoImage($post);
error($config['error']['mime_exploit']);
}
} }
require_once 'inc/image.php'; require_once 'inc/image.php';