From dd511eaa590e83c7d8838ccb9bd3eb66495ef623 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 24 Jul 2023 10:37:59 +0200 Subject: [PATCH] dns/rfc2136: allow trailing dot in keyname #3510 --- dns/rfc2136/Makefile | 1 + dns/rfc2136/src/www/services_rfc2136_edit.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dns/rfc2136/Makefile b/dns/rfc2136/Makefile index dac21994a..fa96105eb 100644 --- a/dns/rfc2136/Makefile +++ b/dns/rfc2136/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= rfc2136 PLUGIN_VERSION= 1.8 +PLUGIN_REVISION= 1 PLUGIN_COMMENT= RFC-2136 Support PLUGIN_MAINTAINER= franco@opnsense.org PLUGIN_DEPENDS= bind-tools diff --git a/dns/rfc2136/src/www/services_rfc2136_edit.php b/dns/rfc2136/src/www/services_rfc2136_edit.php index 4e093462b..8702129a3 100644 --- a/dns/rfc2136/src/www/services_rfc2136_edit.php +++ b/dns/rfc2136/src/www/services_rfc2136_edit.php @@ -87,7 +87,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (!empty($pconfig['ttl']) && !is_numericint($pconfig['ttl'])) { $input_errors[] = gettext("The DNS update TTL must be an integer."); } - if (!empty($pconfig['keyname']) && !is_domain($pconfig['keyname'])) { + if (!empty($pconfig['keyname']) && !is_domain(preg_replace('/\.$/', '', $pconfig['keyname']))) { $input_errors[] = gettext("The DNS update key name contains invalid characters."); } if (!in_array($pconfig['keyalgo'] , array_keys($nsukeyalgos))) {