diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/ActionsController.php b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/ActionsController.php index a9be0c84e..c40ced752 100644 --- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/ActionsController.php +++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/ActionsController.php @@ -91,7 +91,7 @@ class ActionsController extends ApiMutableModelControllerBase { if ($response = $this->callBackend( ["test-sftp-connection"], - ["sftp_host", "sftp_host_key", "sftp_port", "sftp_user", "sftp_identity_type", "sftp_remote_path"])) { + ["sftp_host", "sftp_host_key", "sftp_port", "sftp_user", "sftp_identity_type", "sftp_remote_path", "sftp_chmod", "sftp_chgrp"])) { return $response; } diff --git a/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/actions.volt b/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/actions.volt index 5edb1fed9..1585373c1 100644 --- a/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/actions.volt +++ b/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/actions.volt @@ -133,11 +133,11 @@ POSSIBILITY OF SUCH DAMAGE. var errors = [ {cond: ["connect_failed", "invalid_parameters"], msg: "{{ lang._('Host or username not specified.') }}"}, - {cond: ["connect_failed", "host_not_trusted"], msg: "{{ lang._('Host cannot be trusted.') }}"}, {cond: ["connect_failed", "host_not_resolved"], msg: "{{ lang._('Failed to resolve hostname.') }}"}, {cond: ["connect_failed", "connection_refused"], msg: "{{ lang._('Connection to host refused.') }}"}, {cond: ["connect_failed", "network_timeout"], msg: "{{ lang._('Connection timed out.') }}"}, {cond: ["connect_failed", "network_unreachable"], msg: "{{ lang._('Host not reachable.') }}"}, + {cond: ["connect_failed", "host_not_trusted"], msg: "{{ lang._('Host cannot be trusted.') }}"}, {cond: ["connect_failed", "permission_denied"], msg: "{{ lang._('Host does not permit a connection for the specified user & identity.') }}"}, {cond: ["connect_failed"], msg: "{{ lang._('Failed to connect to host.') }}"}, {cond: ["change_home_dir_failed"], msg: "{{ lang._('Failed to change the remote path.') }}"}, @@ -163,7 +163,7 @@ POSSIBILITY OF SUCH DAMAGE. statusClass = "alert-success"; message = "{{ lang._('Connection and upload test succeeded.') }}" } else { - detail = JSON.stringify(data, null, ' '); + detail = JSON.stringify(data, null, ' ').replace(/\\"/g, "'"); for (var i = 0; i < errors.length; i++) { var error = errors[i], diff --git a/security/acme-client/src/opnsense/service/conf/actions.d/actions_acmeclient.conf b/security/acme-client/src/opnsense/service/conf/actions.d/actions_acmeclient.conf index 0637f185b..7c53c1cfd 100644 --- a/security/acme-client/src/opnsense/service/conf/actions.d/actions_acmeclient.conf +++ b/security/acme-client/src/opnsense/service/conf/actions.d/actions_acmeclient.conf @@ -92,7 +92,7 @@ message:uploading a certificate to sftp server [test-sftp-connection] command:/usr/local/opnsense/scripts/OPNsense/AcmeClient/upload_sftp.php -parameters:--host=%s --host-key=%s --port=%s --user=%s --identity-type=%s --remote-path=%s --no-error test-connection +parameters:--host=%s --host-key=%s --port=%s --user=%s --identity-type=%s --remote-path=%s --chmod=%s --chgrp=%s --no-error test-connection type:script_output message:testing connection to sftp server