summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-firewall/luasrc/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-18 04:48:32 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-18 04:48:32 +0000
commitdfc723af3ec8a47871fa27b9b9fb837895453777 (patch)
tree0e04de99da7454be6452aaad29069dcda8bb7497 /applications/luci-firewall/luasrc/model
parent40254276927f08fd24b874e287795ff86cc2b7d8 (diff)
applications/luci-firewall: filter carriage returns in received custom rules text
Diffstat (limited to 'applications/luci-firewall/luasrc/model')
-rw-r--r--applications/luci-firewall/luasrc/model/cbi/luci_fw/zones.lua1
1 files changed, 1 insertions, 0 deletions
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 f0e7b8665d..d40de7cdba 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