luci-mod-network: dhcp.js: relax CNAME domain validation
authorJo-Philipp Wich <jo@mein.io>
Sun, 18 Feb 2024 23:22:38 +0000 (00:22 +0100)
committerPaul Donald <newtwen@gmail.com>
Thu, 7 Mar 2024 00:29:06 +0000 (01:29 +0100)
Relax the CNAME domain validation to allow wildcard names.

Fixes: #6801
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c8cddc35302380882bab910679f717d65f715029)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index 2006657f0f18b56ed29e70bc47cc24685e974513..c723a4505432bafc657e102d41ad73636c621db6 100644 (file)
@@ -883,7 +883,7 @@ return view.extend({
 
                so = ss.option(form.Value, 'cname', _('Domain'));
                so.rmempty = false;
-               so.datatype = 'hostname';
+               so.validate = validateHostname;
                so.placeholder = 'www.example.com.';
 
                so = ss.option(form.Value, 'target', _('Target'));