diff options
author | Senorsen <senorsen.zhang@gmail.com> | 2016-03-16 01:49:40 +0800 |
---|---|---|
committer | Senorsen <senorsen.zhang@gmail.com> | 2016-03-16 01:49:40 +0800 |
commit | a6631eceb47e14102ce91bcb274abe75a520235d (patch) | |
tree | a8485ed2e32cba486621d6610818f12b6f5805d6 /apps/files_external/lib/sftp.php | |
parent | f7140294f26f7966aa00cfdd49c76a14d39df04e (diff) | |
download | nextcloud-server-a6631eceb47e14102ce91bcb274abe75a520235d.tar.gz nextcloud-server-a6631eceb47e14102ce91bcb274abe75a520235d.zip |
Add urlencode to username part of ftp and sftp links
according to #17796
Diffstat (limited to 'apps/files_external/lib/sftp.php')
-rw-r--r-- | apps/files_external/lib/sftp.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index f6b2873cf49..fc55e800a89 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -459,7 +459,7 @@ class SFTP extends \OC\Files\Storage\Common { // Do not pass the password here. We want to use the Net_SFTP object // supplied via stream context or fail. We only supply username and // hostname because this might show up in logs (they are not used). - $url = 'sftp://'.$this->user.'@'.$this->host.':'.$this->port.$this->root.$path; + $url = 'sftp://' . urlencode($this->user) . '@' . $this->host . ':' . $this->port . $this->root . $path; return $url; } } |