[VD:LocalFileSystem] check fimename based MIME type on extract

This commit is contained in:
nao-pon
2015-11-12 09:45:37 +09:00
parent 622460d670
commit 65e193f8e5
+3 -1
View File
@@ -655,7 +655,9 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
foreach (scandir($path) as $name) {
if ($name != '.' && $name != '..') {
$p = $path.DIRECTORY_SEPARATOR.$name;
if (is_link($p) || !$this->nameAccepted($name)) {
if (is_link($p) || !$this->nameAccepted($name)
||
(($mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name)) && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) {
return true;
}
if (is_dir($p) && $this->_findSymlinks($p)) {