From 3a937f79f72117be16d905d1fa421d93130a48a3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 20 Oct 2011 22:55:27 +0200 Subject: escape filenames for getMimeType --- lib/filestorage/local.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/filestorage') diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index 8db0ffead4e..58c34e972de 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -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); -- cgit v1.2.3