mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/acme-client: backend result changes slightly
This commit is contained in:
+7
-2
@@ -74,8 +74,13 @@ class HttpOpnsense extends Base implements LeValidationInterface
|
||||
if (!empty((string)$this->config->http_opn_interface)) {
|
||||
$backend = new \OPNsense\Core\Backend();
|
||||
$response = json_decode($backend->configdpRun('interface address', [(string)$this->config->http_opn_interface]));
|
||||
if (!empty($response->address)) {
|
||||
$iplist[] = $response->address;
|
||||
// XXX Returns both IPv4 and IPv6 now. While "[0]" and
|
||||
// "[1]" should remain in this order it would make sense
|
||||
// to ensure "family" matches "inet" or "inet6" and/or
|
||||
// pull both addresses for missing IPv6 support depending
|
||||
// on how this should work.
|
||||
if (!empty($response[0]->address)) {
|
||||
$iplist[] = $response[0]->address;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-2
@@ -75,8 +75,13 @@ class TlsalpnAcme extends Base implements LeValidationInterface
|
||||
if (!empty((string)$this->config->tlsalpn_acme_interface)) {
|
||||
$backend = new \OPNsense\Core\Backend();
|
||||
$response = json_decode($backend->configdpRun('interface address', [(string)$this->config->tlsalpn_acme_interface]));
|
||||
if (!empty($response->address)) {
|
||||
$iplist[] = $response->address;
|
||||
// XXX Returns both IPv4 and IPv6 now. While "[0]" and
|
||||
// "[1]" should remain in this order it would make sense
|
||||
// to ensure "family" matches "inet" or "inet6" and/or
|
||||
// pull both addresses for missing IPv6 support depending
|
||||
// on how this should work.
|
||||
if (!empty($response[0]->address)) {
|
||||
$iplist[] = $response[0]->address;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user