[Pkg-owncloud-commits] [owncloud] 287/394: proper escape the mountpoints. Fixes https://github.com/owncloud/core/issues/557 in stable45

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


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

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit 0825f2c0bb94517c55a1bfcd73e534fca910c7d4
Author: Thomas Mueller <thomas.mueller at tmit.eu>
Date:   Thu Jan 17 15:44:54 2013 +0100

    proper escape the mountpoints. Fixes
    https://github.com/owncloud/core/issues/557
    in stable45
---
 apps/files_external/lib/config.php |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 1deb287..a55b00d 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -256,7 +256,7 @@ class OC_Mount_Config {
 			foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) {
 				$content .= "\t\t'".$group."' => array (\n";
 				foreach ($mounts as $mountPoint => $mount) {
-					$content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
+					$content .= "\t\t\t'".addcslashes($mountPoint,"'")."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
 
 				}
 				$content .= "\t\t),\n";
@@ -268,7 +268,7 @@ class OC_Mount_Config {
 			foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) {
 				$content .= "\t\t'".$user."' => array (\n";
 				foreach ($mounts as $mountPoint => $mount) {
-					$content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
+					$content .= "\t\t\t'".addcslashes($mountPoint,"'")."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
 				}
 				$content .= "\t\t),\n";
 			}

-- 
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