summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/sftp.php
diff options
context:
space:
mode:
authorhkjolhede <hkjolhede@gmail.com>2013-01-26 19:46:23 +0100
committerhkjolhede <hkjolhede@gmail.com>2013-01-26 19:46:23 +0100
commita26d50640fc4a2524255c85b10fb010676b3e22d (patch)
treee2dcfb55326ca63c8ce9d4184e34b89df106a8da /apps/files_external/lib/sftp.php
parent2fa3efd697833664cfa91d61dbd83cbd49a46417 (diff)
downloadnextcloud-server-a26d50640fc4a2524255c85b10fb010676b3e22d.tar.gz
nextcloud-server-a26d50640fc4a2524255c85b10fb010676b3e22d.zip
Update apps/files_external/lib/sftp.php
Added cleaning the root path
Diffstat (limited to 'apps/files_external/lib/sftp.php')
-rw-r--r--apps/files_external/lib/sftp.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index 22cb8d1651c..53956182977 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -27,7 +27,7 @@ class OC_Filestorage_SFTP extends OC_Filestorage_Common {
}
$this->user = $params['user'];
$this->password = $params['password'];
- $this->root = isset($params['root']) ? $params['root'] : '/';
+ $this->root = isset($params['root']) ? $this->cleanPath($params['root']) : '/';
if ($this->root[0] != '/') $this->root = '/' . $this->root;
if (substr($this->root, -1, 1) != '/') $this->root .= '/';