firewall: validate max length of zone name 451/head
authorHannu Nyman <hannu.nyman@iki.fi>
Wed, 26 Aug 2015 10:51:31 +0000 (13:51 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Wed, 26 Aug 2015 10:55:26 +0000 (13:55 +0300)
commit34e875b3d35fa1d4dde0a3ec662868213b710c55
tree8fcbad489f9fbfd1d85974540d3e6c6168edbed6
parent084d435060f73a8e098c8022a43bd9f5b1fd63ca
firewall: validate max length of zone name

fw3 sets the maximum length of the zone name to 14 and
ignores zone definitions with too long names.
http://nbd.name/gitweb.cgi?p=firewall3.git;a=blob;f=zones.h;hb=HEAD#l25
http://nbd.name/gitweb.cgi?p=firewall3.git;a=blob;f=zones.c;hb=HEAD#l195

Add a simple validation to ensure that the new zone name is short enough.
This should fix issue #345

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua