Skip to content

Commit 9773354

Browse files
committed
luci-app-firewall: use more strict validation for zone names
they shall not begin with a digit. Signed-off-by: Paul Donald <[email protected]>
1 parent de5ddeb commit 9773354

File tree

1 file changed

+1
-1
lines changed
  • applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall

1 file changed

+1
-1
lines changed

applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ return view.extend({
130130
o.placeholder = _('Unnamed zone');
131131
o.modalonly = true;
132132
o.rmempty = false;
133-
o.datatype = L.hasSystemFeature('firewall4') ? 'uciname' : 'and(uciname,maxlength(11))';
133+
o.datatype = L.hasSystemFeature('firewall4') ? 'ucifw4zonename' : 'and(ucifw4zonename,maxlength(11))';
134134
o.write = function(section_id, formvalue) {
135135
var cfgvalue = this.cfgvalue(section_id);
136136

0 commit comments

Comments
 (0)