luci-base: tools.widget.NetworkSelect: disallow invalid network names
authorJo-Philipp Wich <jo@mein.io>
Fri, 6 Nov 2020 23:40:31 +0000 (00:40 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 6 Nov 2020 23:42:58 +0000 (00:42 +0100)
Fixes: #4523, #4573
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2b99473f2cd3321ecf96e92606c3263c2941eb7b)

modules/luci-base/htdocs/luci-static/resources/tools/widgets.js

index 7f724a17e42c851aed57fa180762d1744f8ff9d9..367e1cb0f042cd9c7a993aca955bcaedb8557de4 100644 (file)
@@ -393,6 +393,7 @@ var CBINetworkSelect = form.ListValue.extend({
                        select_placeholder: E('em', _('unspecified')),
                        display_items: this.display_size || this.size || 3,
                        dropdown_items: this.dropdown_size || this.size || 5,
+                       datatype: 'uciname',
                        validate: L.bind(this.validate, this, section_id),
                        create: !this.nocreate,
                        create_markup: '' +