From 29ed1f9121d33232b52d13b5e80b9f2ff9d2d6f9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 23 Mar 2020 22:20:50 +0100 Subject: [PATCH] luci-mod-network: dhcp.js: properly validate hostname values Signed-off-by: Jo-Philipp Wich (cherry picked from commit 98a9d07d8998fae912ff43ee4d45ed8ad09aa04c) --- .../htdocs/luci-static/resources/view/network/dhcp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 2939aa568..d37bbe2ae 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -398,7 +398,7 @@ return view.extend({ ss.anonymous = true; so = ss.option(form.Value, 'name', _('Hostname')); - so.datatype = 'hostname("strict")'; + so.validate = validateHostname; so.rmempty = true; so.write = function(section, value) { uci.set('dhcp', section, 'name', value); -- 2.25.1