summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/lib/sftp.php3
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'])) {