mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
fixed file vulnerability
This commit is contained in:
parent
5b346c1ed9
commit
c79a4b2c01
@ -106,12 +106,8 @@ if (!function_exists('mime_content_type')) {
|
|||||||
finfo_close($finfo);
|
finfo_close($finfo);
|
||||||
return $mimetype;
|
return $mimetype;
|
||||||
} else {
|
} else {
|
||||||
$temp = exec('file '.$filename);
|
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');
|
||||||
if (isset($temp) && $temp != '') {
|
return 'unknown';
|
||||||
return $temp;
|
|
||||||
} else {
|
|
||||||
return 'application/octet-stream';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user