From 3a937f79f72117be16d905d1fa421d93130a48a3 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind1991@gmail.com>
Date: Thu, 20 Oct 2011 22:55:27 +0200
Subject: [PATCH] escape filenames for getMimeType

---
 lib/filestorage/local.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 8db0ffead4..58c34e972d 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);
-- 
GitLab