Merge pull request #3813 from kulikov-a/acme_validation_libs_typos

security/acme-client: http/tlsalpn libs typos
This commit is contained in:
Frank Wall 2024-02-19 18:19:59 +01:00 committed by GitHub
commit 67dcafefc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View file

@ -50,7 +50,7 @@ class HttpOpnsense extends Base implements LeValidationInterface
$iplist = array();
// Add IP addresses from auto-discovery feature
if ($this->config->http_opn_autodiscovery == 1) {
if ($this->config->http_opn_autodiscovery == '1') {
$dnslist = explode(',', $this->cert_altnames);
$dnslist[] = $this->cert_name;
foreach ($dnslist as $fqdn) {
@ -73,9 +73,9 @@ class HttpOpnsense extends Base implements LeValidationInterface
// Add IP address from chosen interface
if (!empty((string)$this->config->http_opn_interface)) {
$backend = new \OPNsense\Core\Backend();
$response = $backend->configdpRun('interface address', [(string)$this->config->http_opn_interface]);
if (!empty($response['address'])) {
$iplist[] = $response['address'];
$response = json_decode($backend->configdpRun('interface address', [(string)$this->config->http_opn_interface]));
if (!empty($response->address)) {
$iplist[] = $response->address;
}
}

View file

@ -51,7 +51,7 @@ class TlsalpnAcme extends Base implements LeValidationInterface
$iplist = array();
// Add IP addresses from auto-discovery feature
if ($this->config->tlsalpn_acme_autodiscovery == 1) {
if ($this->config->tlsalpn_acme_autodiscovery == '1') {
$dnslist = explode(',', $this->cert_altnames);
$dnslist[] = $this->cert_name;
foreach ($dnslist as $fqdn) {
@ -74,9 +74,9 @@ class TlsalpnAcme extends Base implements LeValidationInterface
// Add IP address from chosen interface
if (!empty((string)$this->config->tlsalpn_acme_interface)) {
$backend = new \OPNsense\Core\Backend();
$response = $backend->configdpRun('interface address', [(string)$this->config->tlsalpn_acme_interface]);
if (!empty($response['address'])) {
$iplist[] = $response['address'];
$response = json_decode($backend->configdpRun('interface address', [(string)$this->config->tlsalpn_acme_interface]));
if (!empty($response->address)) {
$iplist[] = $response->address;
}
}