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>
Mon, 23 Mar 2020 21:20:50 +0000 (22:20 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index 4e217a5416ea420f1a0d729d66c60842346a18f9..81ea32d48c54ce977d3b582a5f9cd789f527d090 100644 (file)
@@ -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);