luci-mod-network: dhcp.js: properly validate hostname values
authorJo-Philipp Wich <jo@mein.io>
Mon, 23 Mar 2020 21:20:50 +0000 (22:20 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 98a9d07d8998fae912ff43ee4d45ed8ad09aa04c)

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

index 2939aa568c9ca46be6fec65783e067a488664246..d37bbe2aef883cff72e7038c6fd9bd6710b2c3ba 100644 (file)
@@ -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);