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)
committerJo-Philipp Wich <jo@mein.io>
Sun, 18 Feb 2024 23:23:27 +0000 (00:23 +0100)
Relax the CNAME domain validation to allow wildcard names.

Fixes: #6801
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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'));