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 f0e7b8665d56b3342e3a30480f24ac2752a0ed0a..d40de7cdba2bc8eaa255c54189643643769b3828 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