diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index e9c0804c23aa4..65a5f6b3eefb3 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -64,6 +64,13 @@ private function splitHost(string $host): array { } public function __construct(array $parameters) { + if (!isset($parameters['host'])) { + throw new \Exception('Invalid configuration, no host provided'); + } + if (!isset($parameters['user'])) { + throw new \Exception('Invalid configuration, no user provided'); + } + // Register sftp:// Stream::register();