diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-26 14:48:45 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-26 14:48:45 +0100 |
commit | 54e58b520c055c030c052dbbf43d865e6b2a2a49 (patch) | |
tree | 93bf2667b1eba6381b0fabe10e44dbce7a6f5e35 /apps/files_external/lib | |
parent | ce753231eb3ed36a2f5250a2b9cc118fad8dad37 (diff) | |
download | nextcloud-server-54e58b520c055c030c052dbbf43d865e6b2a2a49.tar.gz nextcloud-server-54e58b520c055c030c052dbbf43d865e6b2a2a49.zip |
Handle no user set in sftp constructor
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/sftp.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index ec808cd76dc..09d743ff93d 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -85,6 +85,9 @@ class SFTP extends \OC\Files\Storage\Common { $this->host = $parsedHost[0]; $this->port = $parsedHost[1]; + if (!isset($params['user'])) { + throw new \UnexpectedValueException('no authentication parameters specified'); + } $this->user = $params['user']; if (isset($params['public_key_auth'])) { |