From 54e58b520c055c030c052dbbf43d865e6b2a2a49 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 26 Jan 2016 14:48:45 +0100 Subject: [PATCH] Handle no user set in sftp constructor --- apps/files_external/lib/sftp.php | 3 +++ 1 file changed, 3 insertions(+) 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'])) { -- 2.39.5