Vergleich inc/functions_upload.php - 1.2.0 - 1.2.1

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 340Zeile 340

// Check if the uploaded file type matches the correct image type (returned by getimagesize)
$img_dimensions = @getimagesize($mybb->settings['uploadspath']."/".$filename);


// Check if the uploaded file type matches the correct image type (returned by getimagesize)
$img_dimensions = @getimagesize($mybb->settings['uploadspath']."/".$filename);

		if($img_dimensions[2] != $img_type)

		if(!is_array($img_dimensions) || $img_dimensions[2] != $img_type)

		{
@unlink($mybb->settings['uploadspath']."/".$filename);
$ret['error'] = $lang->error_uploadfailed;
return $ret;

		{
@unlink($mybb->settings['uploadspath']."/".$filename);
$ret['error'] = $lang->error_uploadfailed;
return $ret;

		}		

		}	

		require_once MYBB_ROOT."inc/functions_image.php";
$thumbname = str_replace(".attach", "_thumb.$ext", $filename);
$thumbnail = generate_thumbnail($mybb->settings['uploadspath']."/".$filename, $mybb->settings['uploadspath'], $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);

		require_once MYBB_ROOT."inc/functions_image.php";
$thumbname = str_replace(".attach", "_thumb.$ext", $filename);
$thumbnail = generate_thumbnail($mybb->settings['uploadspath']."/".$filename, $mybb->settings['uploadspath'], $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);