Skip to content

Commit 9dc7eb1

Browse files
pac0sanbackportbot[bot]
authored andcommitted
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 <[email protected]> Signed-off-by: provokateurin <[email protected]>
1 parent 450633e commit 9dc7eb1

File tree

1 file changed

+1
-1
lines changed
  • apps/files_external/lib/Lib/Storage

1 file changed

+1
-1
lines changed

apps/files_external/lib/Lib/Storage/SFTP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function __construct(array $parameters) {
7070
$parsedHost = $this->splitHost($parameters['host']);
7171

7272
$this->host = $parsedHost[0];
73-
$this->port = $parsedHost[1];
73+
$this->port = $parameters['port'] ?? $parsedHost[1];
7474

7575
if (!isset($parameters['user'])) {
7676
throw new \UnexpectedValueException('no authentication parameters specified');

0 commit comments

Comments
 (0)