Merge branch 'ent-5237-Vulnerabilidad-en-una-funcion-de-gestión-de-ficheros-externos' into 'develop'

fixed file vulnerability

See merge request artica/pandorafms!2994
This commit is contained in:
Daniel Rodriguez 2020-01-13 15:07:16 +01:00
commit f32d3ecc0b
1 changed files with 2 additions and 6 deletions

View File

@ -106,12 +106,8 @@ if (!function_exists('mime_content_type')) {
finfo_close($finfo);
return $mimetype;
} else {
$temp = exec('file '.$filename);
if (isset($temp) && $temp != '') {
return $temp;
} else {
return 'application/octet-stream';
}
error_log('Warning: Cannot find finfo_open function. Fileinfo extension is not enabled. Please add "extension=fileinfo.so" or "extension=fileinfo.dll" in your php.ini');
return 'unknown';
}
}