From: Jo-Philipp Wich Date: Mon, 23 Mar 2020 21:20:50 +0000 (+0100) Subject: luci-mod-network: dhcp.js: properly validate hostname values X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=98a9d07d8998fae912ff43ee4d45ed8ad09aa04c;p=oweals%2Fluci.git luci-mod-network: dhcp.js: properly validate hostname values Signed-off-by: Jo-Philipp Wich --- 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 4e217a541..81ea32d48 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 @@ -395,7 +395,7 @@ return L.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);