mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
security/acme-client: set default SFTP/SSH port if unset, fixes #4363
This commit is contained in:
parent
ee2eda08ed
commit
636a1f18ba
3 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue