summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static/resources/view
diff options
context:
space:
mode:
authorGlenn Washburn <development@efficientek.com>2023-03-01 23:39:48 -0600
committerJo-Philipp Wich <jo@mein.io>2023-03-15 23:56:59 +0100
commit6ad6a241c32ebd4d62f6021a2e3cbe4e1bc192c2 (patch)
tree3adcf506c7f6b0139c2677c866421d41199af2ca /modules/luci-mod-network/htdocs/luci-static/resources/view
parent9c55500fe8efa309d55f34c21d5ae2bf69fabf06 (diff)
luci-mod-network: add stricter wireless interface name validation
Linux wireless interface names have the following restrictions: * It must not be an empty string * It must not be '.' or '..' * It must not contain any /, : or space character ( , \t, \n, ...) * It must be less than 16 chars * It likely must not contain any % either Fixes: 8673aef8db ("luci-mod-network: remove uciname validation from wireless interface") Signed-off-by: Glenn Washburn <development@efficientek.com> [reword validation error messages, remove extended description text as it would be shown as part of the validation errors] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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.js2
1 files changed, 1 insertions, 1 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 a2b0c84ce2..6b1bd262fb 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
@@ -1152,7 +1152,7 @@ return view.extend({
o = ss.taboption('advanced', form.Value, 'ifname', _('Interface name'), _('Override default interface name'));
o.optional = true;
- o.datatype = 'maxlength(15)';
+ o.datatype = 'netdevname';
o.placeholder = radioNet.getIfname();
if (/^radio\d+\.network/.test(o.placeholder))
o.placeholder = '';