summaryrefslogtreecommitdiff
path: root/interface-definitions/dns-forwarding.xml.in
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-04-03 16:07:55 -0500
committerIndrajit Raychaudhuri <irc@indrajit.com>2023-04-04 01:54:14 -0500
commit8afe702361df75049329c0db3ce7f91127498f54 (patch)
treefc15d223e71e1bc414b5f3287f70a689915f9b04 /interface-definitions/dns-forwarding.xml.in
parent94b65bb3936b607a6bc85fe23176ff855c722519 (diff)
downloadvyos-1x-8afe702361df75049329c0db3ce7f91127498f54.tar.gz
vyos-1x-8afe702361df75049329c0db3ce7f91127498f54.zip
dns: T5143: Apply constraint for domain name in DNS forwarding
This will prevent arbitrary strings from being entered as domain names. Additionally, reuse the fqdn validator instead of a custom regex.
Diffstat (limited to 'interface-definitions/dns-forwarding.xml.in')
-rw-r--r--interface-definitions/dns-forwarding.xml.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/interface-definitions/dns-forwarding.xml.in b/interface-definitions/dns-forwarding.xml.in
index 14b38b24d..2b6892ce5 100644
--- a/interface-definitions/dns-forwarding.xml.in
+++ b/interface-definitions/dns-forwarding.xml.in
@@ -83,6 +83,13 @@
<tagNode name="domain">
<properties>
<help>Domain to forward to a custom DNS server</help>
+ <valueHelp>
+ <format>text</format>
+ <description>An absolute DNS domain name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="fqdn"/>
+ </constraint>
</properties>
<children>
#include <include/name-server-ipv4-ipv6-port.xml.i>
@@ -105,10 +112,10 @@
<help>Domain to host authoritative records for</help>
<valueHelp>
<format>text</format>
- <description>An absolute DNS name</description>
+ <description>An absolute DNS domain name</description>
</valueHelp>
<constraint>
- <regex>[-_a-zA-Z0-9.]{1,63}</regex>
+ <validator name="fqdn"/>
</constraint>
</properties>
<children>