Zeile 6 | Zeile 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 2423 2006-11-20 00:16:03Z CraKteR $
|
*/
| */
|
Zeile 152 | Zeile 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": $img_type = 2;
| case "image/x-jpeg": case "image/pjpeg": $img_type = 2;
|
Zeile 326 | Zeile 327 |
---|
$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": $img_type = 2;
| case "image/x-jpeg": case "image/pjpeg": $img_type = 2;
|
Zeile 340 | Zeile 342 |
---|
// 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;
|