From: Jo-Philipp Wich Date: Thu, 18 Nov 2010 04:48:32 +0000 (+0000) Subject: applications/luci-firewall: filter carriage returns in received custom rules text X-Git-Tag: 0.10.0~421 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dfc723af3ec8a47871fa27b9b9fb837895453777;p=oweals%2Fluci.git applications/luci-firewall: filter carriage returns in received custom rules text --- 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