Skip to content

Commit

Permalink
luci-base: Enforce maximal firewall zone name length with fw3 only
Browse files Browse the repository at this point in the history
firewall3 enforces the zone name length. firewall4 does not.

#7549 (comment)

Signed-off-by: Paul Donald <[email protected]>
  • Loading branch information
systemcrash committed Jan 10, 2025
1 parent a075566 commit a67d683
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ return view.extend({
o.placeholder = _('Unnamed zone');
o.modalonly = true;
o.rmempty = false;
o.datatype = 'and(uciname,maxlength(11))';
o.datatype = L.hasSystemFeature('firewall4') ? '' : 'and(uciname,maxlength(11))';
o.write = function(section_id, formvalue) {
var cfgvalue = this.cfgvalue(section_id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ var CBIZoneSelect = form.ListValue.extend({
display_items: this.display_size || this.size || 3,
dropdown_items: this.dropdown_size || this.size || 5,
validate: L.bind(this.validate, this, section_id),
datatype: 'and(uciname,maxlength(11))',
datatype: L.hasSystemFeature('firewall4') ? '' : 'and(uciname,maxlength(11))',
create: !this.nocreate,
create_markup: '' +
'<li data-value="{{value}}">' +
Expand Down

0 comments on commit a67d683

Please sign in to comment.