diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2023-01-14 10:40:43 +0200 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2023-01-14 10:40:43 +0200 |
commit | 0c1be9ae5380d0ac11cccfe152a158eee5bd7125 (patch) | |
tree | 62a457ed24eca1f8354a7f725c4c6f36814366b2 /modules/luci-mod-network/htdocs/luci-static/resources/view | |
parent | 77f2d8895bce0a3e5ee9f72db9e1e8219c61f140 (diff) |
luci-mod-network: Add length restriction to wireless interface name
Based on issue #6101, add a maxlength of 15 chars to the wireless
interface's optional name field. Also validate it as uciname.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/view')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 420b381e2f..de3eacff23 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -1159,6 +1159,7 @@ return view.extend({ o = ss.taboption('advanced', form.Value, 'ifname', _('Interface name'), _('Override default interface name')); o.optional = true; + o.datatype = 'and(uciname,maxlength(15))'; o.placeholder = radioNet.getIfname(); if (/^radio\d+\.network/.test(o.placeholder)) o.placeholder = ''; |