mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/acme-client: set default SFTP/SSH port if unset, fixes #4363
This commit is contained in:
@@ -8,6 +8,11 @@ WWW: https://github.com/acmesh-official/acme.sh
|
||||
Plugin Changelog
|
||||
================
|
||||
|
||||
4.7
|
||||
|
||||
Fixed:
|
||||
* SFTP/SSH automation results in fatal PHP error (#4363)
|
||||
|
||||
4.6
|
||||
|
||||
Added:
|
||||
|
||||
@@ -189,7 +189,7 @@ function runRemoteCommand(array $options, &$error): ?array
|
||||
$identity_type = trim(($options["identity-type"] ?? ""));
|
||||
$host = trim(($options["host"] ?? ""));
|
||||
$host_key = ($options["host-key"] ?? "");
|
||||
$port = $options["port"] ?? 22;
|
||||
$port = !empty($options["port"]) ? $options["port"] : SSHKeys::DEFAULT_PORT;
|
||||
$username = $options["user"] ?? false;
|
||||
$command = $options["run"] ?? "";
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ function connectWithServer(array $options, &$error): ?SftpClient
|
||||
$identity_type = trim(($options["identity-type"] ?? "")) ?: SSHKeys::DEFAULT_IDENTITY_TYPE;
|
||||
$host = trim(($options["host"] ?? ""));
|
||||
$host_key = ($options["host-key"] ?? "");
|
||||
$port = $options["port"] ?? 22;
|
||||
$port = !empty($options["port"]) ? $options["port"] : SSHKeys::DEFAULT_PORT;
|
||||
$username = $options["user"];
|
||||
|
||||
$sftp = new SftpClient(configPath(), $identity_type);
|
||||
|
||||
Reference in New Issue
Block a user