mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-app-firewall: use more strict validation for zone names
they shall not begin with a digit. Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -130,7 +130,7 @@ return view.extend({
|
|||||||
o.placeholder = _('Unnamed zone');
|
o.placeholder = _('Unnamed zone');
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.datatype = L.hasSystemFeature('firewall4') ? 'uciname' : 'and(uciname,maxlength(11))';
|
o.datatype = L.hasSystemFeature('firewall4') ? 'ucifw4zonename' : 'and(ucifw4zonename,maxlength(11))';
|
||||||
o.write = function(section_id, formvalue) {
|
o.write = function(section_id, formvalue) {
|
||||||
var cfgvalue = this.cfgvalue(section_id);
|
var cfgvalue = this.cfgvalue(section_id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user