diff options
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/smb.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 96778b0b2e1..ffba0d000ca 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -45,7 +45,10 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ if (substr($path, -1)=='/') { $path=substr($path, 0, -1); } - return 'smb://'.$this->user.':'.$this->password.'@'.$this->host.$this->share.$this->root.$path; + $path = urlencode($path); + $user = urlencode($this->user); + $pass = urlencode($this->password); + return 'smb://'.$user.':'.$pass.'@'.$this->host.$this->share.$this->root.$path; } public function stat($path) { @@ -59,11 +62,6 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ } } - public function filetype($path) { - // using opendir causes the same amount of requests and caches the content of the folder in one go - return (bool)@$this->opendir($path) ? 'dir' : 'file'; - } - /** * check if a file or folder has been updated since $time * @param string $path |