fix(files_external): Respect explicit port configuration

It allows the use of the alternative SFTP port defined in the GUI (external storage), instead of the default port (22).

Signed-off-by: pac0san <7056343+pac0san@users.noreply.github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
pac0san 2026-01-25 18:13:21 +01:00 committed by provokateurin
parent 4775ce4266
commit e48f871bd0
No known key found for this signature in database

View file

@ -70,7 +70,7 @@ class SFTP extends Common {
$parsedHost = $this->splitHost($parameters['host']);
$this->host = $parsedHost[0];
$this->port = $parsedHost[1];
$this->port = $parameters['port'] ?? $parsedHost[1];
if (!isset($parameters['user'])) {
throw new \UnexpectedValueException('no authentication parameters specified');