diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml index 5d89e439f..db41ea648 100644 --- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml +++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml @@ -133,6 +133,15 @@ Leave blank to use default "{{name}}/ca.pem". true + + action.sftp_filename_fullchain + + text + Name template for the public certificate fullchain file (cert + ca). + Placeholders "{{name}}" and "%s" are replaced by the name of the certificate being uploaded. + Leave blank to use default "{{name}}/fullchain.pem". + true + header diff --git a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml index 5cd40331c..052bdd530 100644 --- a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml +++ b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml @@ -959,6 +959,12 @@ Should be a string between 1 and 255 characters. Characters are limited to [a-z], [0-9] and [{}@./-_%] and the string must neither begin nor end with '/'. + + N + /^(?![\/\\])[\w\d_\-@.\/{}%]{1,255}(?<![\/\\])$/ui + Should be a string between 1 and 255 characters. + Characters are limited to [a-z], [0-9] and [{}@./-_%] and the string must neither begin nor end with '/'. + /^(?!.*(Let\'s\ Encrypt|acme|[fF]irmware))([\S\s]{1,255})/ 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 b18596edc..ede285981 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 @@ -120,7 +120,6 @@ const UPLOAD_NAME_TEMPLATES = [ "key" => ["default" => "{{name}}/key.pem", "option" => "key-name"], "ca" => ["default" => "{{name}}/ca.pem", "option" => "ca-name"], "fullchain" => ["default" => "{{name}}/fullchain.pem", "option" => "fullchain-name"], - ]; // Exit codes