From dfc723af3ec8a47871fa27b9b9fb837895453777 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 18 Nov 2010 04:48:32 +0000 Subject: [PATCH] applications/luci-firewall: filter carriage returns in received custom rules text --- applications/luci-firewall/luasrc/model/cbi/luci_fw/zones.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/luci-firewall/luasrc/model/cbi/luci_fw/zones.lua b/applications/luci-firewall/luasrc/model/cbi/luci_fw/zones.lua index f0e7b8665..d40de7cdb 100644 --- a/applications/luci-firewall/luasrc/model/cbi/luci_fw/zones.lua +++ b/applications/luci-firewall/luasrc/model/cbi/luci_fw/zones.lua @@ -62,6 +62,7 @@ function custom.cfgvalue(self, section) end function custom.write(self, section, value) + value = value:gsub("\r\n?", "\n") nixio.fs.writefile("/etc/firewall.user", value) end -- 2.25.1