Skip to content
Snippets Groups Projects
Commit 3a937f79 authored by Robin Appelman's avatar Robin Appelman
Browse files

escape filenames for getMimeType

parent e9b6a101
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment