From 1c01c643ba262d38bcad3341f74b0f038b28a2a6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 30 Mar 2023 20:05:44 +0200 Subject: [PATCH] application/luci-app-firewall: fix null access Fixes: 48086e1c7b ("luci-app-firewall: Add ipset field to snats") Fixes: d0d891c23e ("luci-app-firewall: Add ipset field to forwards (redirects)") Fixes: f407a013ba ("luci-app-firewall: Add ipset field to rules") Signed-off-by: Jo-Philipp Wich (cherry picked from commit 7a4afdcb05ad69fd9c0e39de9b44a59ad31130a7) --- .../htdocs/luci-static/resources/view/firewall/forwards.js | 2 +- .../htdocs/luci-static/resources/view/firewall/rules.js | 2 +- .../htdocs/luci-static/resources/view/firewall/snats.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js index 66f50f799e..d7f70de517 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js @@ -243,7 +243,7 @@ return view.extend({ o = s.taboption('advanced', form.Value, 'ipset', _('Use ipset')); uci.sections('firewall', 'ipset', function(s) { if (typeof(s.name) == 'string') - this.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name); + o.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name); }); o.modalonly = true; o.rmempty = true; diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js index 5dda8075a2..018554e991 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js @@ -374,7 +374,7 @@ return view.extend({ o = s.taboption('advanced', form.Value, 'ipset', _('Use ipset')); uci.sections('firewall', 'ipset', function(s) { if (typeof(s.name) == 'string') - this.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name); + o.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name); }); o.modalonly = true; o.rmempty = true; diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js index 6ccb075569..9c3d5e7a31 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js @@ -318,7 +318,7 @@ return view.extend({ o = s.taboption('advanced', form.Value, 'ipset', _('Use ipset')); uci.sections('firewall', 'ipset', function(s) { if (typeof(s.name) == 'string') - this.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name); + o.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name); }); o.modalonly = true; o.rmempty = true; -- 2.30.2