changeset 2561:3da0e3c917cc

mod_firewall: Accept backslash escapes in definitions
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 Feb 2017 09:49:09 +0000
parents fda47e2135e5
children 78efd064aef3
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Fri Feb 24 09:48:45 2017 +0000
+++ b/mod_firewall/mod_firewall.lua	Fri Feb 24 09:49:09 2017 +0000
@@ -71,8 +71,8 @@
 		:gsub("$(%b<>)", function (expr)
 			expr = expr:sub(2,-2);
 			local default = "<undefined>";
-			expr = expr:gsub("||(%b\"\")$", function (s)
-				default = s:sub(2,-2);
+			expr = expr:gsub("||(%b\"\")$", function (default_string)
+				default = stripslashes(default_string:sub(2,-2));
 				return "";
 			end);
 			local func_chain = expr:match("|[%w|]+$");