Установка:
Редактируем файл includes/function_upload.php.
1) Найти:
Код: Выделить всё
/**
* Check the first 256 bytes for forbidden content
*/
function check_content($disallowed_content)
Код: Выделить всё
// noMZ mod begin
/**
* Check file content for MZ signature
*/
function check_noMZ()
{
$fp = @fopen($this->filename, 'rb');
if ($fp !== false)
{
$mz = fread($fp, 3);
fclose($fp);
if (stripos($mz, 'MZ') !== false)
{
return false;
}
}
return true;
}
// noMZ mod end
Код: Выделить всё
return ($file->check_content($this->disallowed_content));
Код: Выделить всё
// noMZ mod begin
return ($file->check_content($this->disallowed_content) && $file->check_noMZ());
// noMZ mod end

