Vergleich inc/functions_upload.php - 1.2.8 - 1.2.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 158Zeile 158
	$file = upload_file($avatar, $mybb->settings['avataruploadpath'], $filename);
if($file['error'])
{

	$file = upload_file($avatar, $mybb->settings['avataruploadpath'], $filename);
if($file['error'])
{

 
		@unlink($mybb->settings['avataruploadpath']."/".$filename);		

		$ret['error'] = $lang->error_uploadfailed;
return $ret;
}

		$ret['error'] = $lang->error_uploadfailed;
return $ret;
}

Zeile 173Zeile 174
	$img_dimensions = @getimagesize($mybb->settings['avataruploadpath']."/".$filename);
if(!is_array($img_dimensions))
{

	$img_dimensions = @getimagesize($mybb->settings['avataruploadpath']."/".$filename);
if(!is_array($img_dimensions))
{

 
		@unlink($mybb->settings['avataruploadpath']."/".$filename);		

		$ret['error'] = $lang->error_uploadfailed;
return $ret;
}

		$ret['error'] = $lang->error_uploadfailed;
return $ret;
}

Zeile 201Zeile 203
	// Check if the uploaded file type matches the correct image type (returned by getimagesize)
if($img_dimensions[2] != $img_type || $img_type == 0)
{

	// Check if the uploaded file type matches the correct image type (returned by getimagesize)
if($img_dimensions[2] != $img_type || $img_type == 0)
{

 
		@unlink($mybb->settings['avataruploadpath']."/".$filename);		

		$ret['error'] = $lang->error_uploadfailed;
return $ret;
}

		$ret['error'] = $lang->error_uploadfailed;
return $ret;
}