applications/luci-firewall: filter carriage returns in received custom rules text
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Nov 2010 04:48:32 +0000 (04:48 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Nov 2010 04:48:32 +0000 (04:48 +0000)
applications/luci-firewall/luasrc/model/cbi/luci_fw/zones.lua

index f0e7b86..d40de7c 100644 (file)
@@ -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