dns/bind: safeguard this as well

This commit is contained in:
Franco Fichtner
2023-08-02 08:42:31 +02:00
parent c9c2a75460
commit fea4f7eb18
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
PLUGIN_NAME= bind
PLUGIN_VERSION= 1.27
PLUGIN_REVISION= 1
PLUGIN_COMMENT= BIND domain name service
PLUGIN_DEPENDS= bind918
PLUGIN_MAINTAINER= m.muenz@gmail.com
@@ -47,6 +47,10 @@ class General extends BaseModel
if (empty($service['dns_ports'])) {
continue;
}
if (!is_array($service['dns_ports'])) {
syslog(LOG_ERR, sprintf('Service %s (%s) reported a faulty "dns_ports" entry.', $service['description'], $service['name']));
continue;
}
if ($service['name'] != 'named' && in_array((string)$this->port, $service['dns_ports'])) {
$messages->appendMessage(new Message(
sprintf(gettext('%s is currently using this port.'), $service['description']),