mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 03:02:01 -04:00
escape filenames for getMimeType
This commit is contained in:
parent
7752008152
commit
16f376bca1
1 changed files with 1 additions and 0 deletions
|
|
@ -143,6 +143,7 @@ class OC_Filestorage_Local extends OC_Filestorage{
|
|||
if ($mimeType=='application/octet-stream' && 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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue