for-15.05 luci-app-firewall: use maxlength datatype for zone name validation
Backport from trunk the zonename validation using a compound datatype "and(uciname,maxlength(14))" fw3 sets the maximum length of the zone name to 14 and ignores zone definitions with too long names. Add a simple validation to ensure that the new zone name is short enough. Backport of34e875b3
andedc58332
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
parent
342af521eb
commit
720f76c561
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ s:tab("advanced", translate("Advanced Settings"))
|
|||
name = s:taboption("general", Value, "name", translate("Name"))
|
||||
name.optional = false
|
||||
name.forcewrite = true
|
||||
name.datatype = "uciname"
|
||||
name.datatype = "and(uciname,maxlength(14))"
|
||||
|
||||
function name.write(self, section, value)
|
||||
if zone:name() ~= value then
|
||||
|
|
Loading…
Reference in a new issue