Vergleich inc/functions_upload.php - 1.2.0 - 1.2.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id: functions_upload.php 2163 2006-08-30 05:53:05Z chris $

 * $Id: functions_upload.php 2598 2007-01-02 17:17:32Z CraKteR $

 */



 */



Zeile 152Zeile 152
			$img_type =  1;
break;
case "image/jpeg":

			$img_type =  1;
break;
case "image/jpeg":

 
		case "image/x-jpg":

		case "image/x-jpeg":
case "image/pjpeg":

		case "image/x-jpeg":
case "image/pjpeg":

 
		case "image/jpg":

			$img_type = 2;
break;
case "image/png":

			$img_type = 2;
break;
case "image/png":

Zeile 242Zeile 244
	}
$ext = get_extension($attachment['name']);
// Check if we have a valid extension

	}
$ext = get_extension($attachment['name']);
// Check if we have a valid extension

	$query = $db->simple_select(TABLE_PREFIX."attachtypes", "*", "extension='$ext'");

	$query = $db->simple_select(TABLE_PREFIX."attachtypes", "*", "extension='".$db->escape_string($ext)."'");

	$attachtype = $db->fetch_array($query);
if(!$attachtype['atid'])
{

	$attachtype = $db->fetch_array($query);
if(!$attachtype['atid'])
{

Zeile 326Zeile 328
				$img_type =  1;
break;
case "image/jpeg":

				$img_type =  1;
break;
case "image/jpeg":

 
			case "image/x-jpg":

			case "image/x-jpeg":
case "image/pjpeg":

			case "image/x-jpeg":
case "image/pjpeg":

 
			case "image/jpg":

				$img_type = 2;
break;
case "image/png":

				$img_type = 2;
break;
case "image/png":

Zeile 340Zeile 344

// 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;

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