From de9ca677014956c873e62cd9743a1270ec27d270 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 28 May 2026 18:47:18 +0200 Subject: [PATCH] fix: better error when missing user or host for sftp Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/SFTP.php | 7 +++++++ 1 file changed, 7 insertions(+) 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();