diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-12-14 23:31:50 +0100 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-12-14 23:31:50 +0100 |
commit | 262fecbe397020e2dde4f6ce5602420295e8a070 (patch) | |
tree | 768b94c954310ef36186a5cd87b1692f666d0b8d | |
parent | f0893fb8fe7f0642ae30de2e1168472377c127e2 (diff) | |
download | nextcloud-server-262fecbe397020e2dde4f6ce5602420295e8a070.tar.gz nextcloud-server-262fecbe397020e2dde4f6ce5602420295e8a070.zip |
proper escape the mountpoints. Fixes
https://github.com/owncloud/core/issues/557
-rwxr-xr-x | apps/files_external/lib/config.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index c0864dc50d2..1be544fbc07 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -331,7 +331,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"; @@ -343,7 +343,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"; } |