luci-app-firewall: fix stored XSS in rule- and forward detail pages

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2a143f4777)
This commit is contained in:
Jo-Philipp Wich 2019-09-13 13:23:23 +02:00
parent 14d2f9b216
commit c048f23bad
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ else
if not name or #name == 0 then
name = translate("(Unnamed Entry)")
end
m.title = "%s - %s" %{ translate("Firewall - Port Forwards"), name }
m.title = "%s - %s" %{ translate("Firewall - Port Forwards"), luci.util.pcdata(name) }
end
s = m:section(NamedSection, arg[1], "redirect", "")

View file

@ -44,7 +44,7 @@ elseif rule_type == "redirect" then
name = "SNAT %s" % name
end
m.title = "%s - %s" %{ translate("Firewall - Traffic Rules"), name }
m.title = "%s - %s" %{ translate("Firewall - Traffic Rules"), luci.util.pcdata(name) }
local wan_zone = nil