06-04-2010, 01:28 PM
06-04-2010, 01:38 PM
This is the fix for this issue:
Replace the foreach and the if($allowedFile) sections with the code below:
Replace the foreach and the if($allowedFile) sections with the code below:
Code:
// check file type
foreach($GLOBALS['allowedFileTypes'] as $thistype)
{
if ($_FILES['file']['type'] == $thistype)
{
$allowedFile = 1;
break;
}
else
{
$allowedFile = 0;
}
}
// illegal file type!
if ($allowedFile != 1)
{
$last_message='MIMETYPE: ' . $_FILES['file']['type'] . ' Failed';
header('Location:error.php?ec=13&last_message=' . urlencode($last_message));
exit;
}