Skip to content
Snippets Groups Projects
Commit e4593095 authored by Jernej Virag's avatar Jernej Virag
Browse files

Fixed escaping of filename when determining MIME type

parent 20f1c1e6
No related branches found
No related tags found
No related merge requests found
......@@ -341,8 +341,8 @@ class OC_Helper {
if (!$isWrapped and $mimeType=='application/octet-stream' && OC_Helper::canExecute("file")) {
// it looks like we have a 'file' command,
// lets see it it does have mime support
$path=str_replace("'","\'",$path);
$fp = popen("file -i -b '$path' 2>/dev/null", "r");
$path=escapeshellarg($path);
$fp = popen("file -i -b $path 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