luci-app-firewall: use more strict validation for zone names
authorPaul Donald <[email protected]>
Wed, 3 Dec 2025 15:54:29 +0000 (16:54 +0100)
committerPaul Donald <[email protected]>
Wed, 3 Dec 2025 15:54:29 +0000 (16:54 +0100)
they shall not begin with a digit.

Signed-off-by: Paul Donald <[email protected]>
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js

index a40f7f3733604e4e386aba841d5340f1c6fbd2c8..dc9b094c324be6992c11bbf349b74b93ba1d9759 100644 (file)
@@ -130,7 +130,7 @@ return view.extend({
                o.placeholder = _('Unnamed zone');
                o.modalonly = true;
                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) {
                        var cfgvalue = this.cfgvalue(section_id);