From: Jo-Philipp Wich Date: Fri, 6 Nov 2020 23:46:30 +0000 (+0100) Subject: luci-base: tools.widgets.NetworkSelect: properly validate multi select X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0e6a8c270ab4db6e7c475f7d07fcdf23691b3e5b;p=project%2Fluci.git luci-base: tools.widgets.NetworkSelect: properly validate multi select Fixes: 2b99473f2 ("luci-base: tools.widget.NetworkSelect: disallow invalid network names") Signed-off-by: Jo-Philipp Wich (cherry picked from commit 5c5b1340e5541d6283b825f7756812fc1784756f) --- diff --git a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js index 367e1cb0f0..5b20cdaff1 100644 --- a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js +++ b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js @@ -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: '' +