[Pkg-owncloud-commits] [owncloud] 16/75: escape filenames for getMimeType

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:08:30 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v3.0.1
in repository owncloud.

commit 16f376bca1e35cc39c12456fd3946cf7293492fc
Author: Robin Appelman <icewind1991 at gmail.com>
Date:   Thu Oct 20 22:55:27 2011 +0200

    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 f0961c1..d1fe87e 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list