Diff

mod_firewall/mod_firewall.lua @ 2561:3da0e3c917cc

mod_firewall: Accept backslash escapes in definitions
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 Feb 2017 09:49:09 +0000
parent 2558:2b533a7b5236
child 2562:78efd064aef3
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|]+$");