зеркало из https://github.com/nextcloud/server.git
escape filenames for getMimeType
This commit is contained in:
Родитель
e9b6a1018d
Коммит
3a937f79f7
|
@ -140,6 +140,7 @@ class OC_Filestorage_Local extends OC_Filestorage{
|
|||
} else if (OC_Helper::canExecute("file")) {
|
||||
// it looks like we have a 'file' command,
|
||||
// lets see it it does have mime support
|
||||
$fspath=str_replace("'","\'",$fspath);
|
||||
$fp = popen("file -i -b '{$this->datadir}$fspath' 2>/dev/null", "r");
|
||||
$reply = fgets($fp);
|
||||
pclose($fp);
|
||||
|
|
Загрузка…
Ссылка в новой задаче