luci-app-mwan3: check rule name length on create
fixes #13499 Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
8c19a2e1b8
commit
678c0b2d5b
1 changed files with 7 additions and 3 deletions
|
@ -61,9 +61,13 @@ mwan_rule.sortable = true
|
|||
mwan_rule.template = "cbi/tblsection"
|
||||
mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "rule", "%s")
|
||||
function mwan_rule.create(self, section)
|
||||
TypedSection.create(self, section)
|
||||
m.uci:save("mwan3")
|
||||
luci.http.redirect(dsp.build_url("admin", "network", "mwan", "rule", section))
|
||||
if #section > 15 then
|
||||
self.invalid_cts = true
|
||||
else
|
||||
TypedSection.create(self, section)
|
||||
m.uci:save("mwan3")
|
||||
luci.http.redirect(dsp.build_url("admin", "network", "mwan", "rule", section))
|
||||
end
|
||||
end
|
||||
|
||||
src_ip = mwan_rule:option(DummyValue, "src_ip", translate("Source address"))
|
||||
|
|
Loading…
Reference in a new issue