diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr index 0bcee071e..f6fb2be75 100644 --- a/security/acme-client/pkg-descr +++ b/security/acme-client/pkg-descr @@ -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: diff --git a/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/run_remote_ssh.php b/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/run_remote_ssh.php index 9a16b8689..97e2b0809 100755 --- a/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/run_remote_ssh.php +++ b/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/run_remote_ssh.php @@ -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"] ?? ""; diff --git a/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/upload_sftp.php b/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/upload_sftp.php index 5a11b3d60..052a1889c 100755 --- a/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/upload_sftp.php +++ b/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/upload_sftp.php @@ -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);