luci-base: tools.widgets.NetworkSelect: properly validate multi select
authorJo-Philipp Wich <jo@mein.io>
Fri, 6 Nov 2020 23:46:30 +0000 (00:46 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 6 Nov 2020 23:48:13 +0000 (00:48 +0100)
Fixes: 2b99473f2 ("luci-base: tools.widget.NetworkSelect: disallow invalid network names")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5c5b1340e5541d6283b825f7756812fc1784756f)

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

index 367e1cb0f042cd9c7a993aca955bcaedb8557de4..5b20cdaff1c3e1cb73055ce49c6cb25a6efb3d88 100644 (file)
@@ -393,7 +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',
+                       datatype: this.multiple ? 'list(uciname)' : 'uciname',
                        validate: L.bind(this.validate, this, section_id),
                        create: !this.nocreate,
                        create_markup: '' +