comparison mod_firewall/mod_firewall.lua @ 2126:b0d711cd3da5

mod_firewall: Fix syntax error
author Matthew Wild <mwild1@gmail.com>
date Thu, 17 Mar 2016 21:30:09 +0000
parents edf5cf3c474b
children 21bc4d7cddae
comparison
equal deleted inserted replaced
2125:edf5cf3c474b 2126:b0d711cd3da5
46 function meta(s, extra) 46 function meta(s, extra)
47 return (s:gsub("$(%b())", [["..tostring(%1).."]]) 47 return (s:gsub("$(%b())", [["..tostring(%1).."]])
48 :gsub("$(%b<>)", function (expr) 48 :gsub("$(%b<>)", function (expr)
49 expr = expr:sub(2,-2); 49 expr = expr:sub(2,-2);
50 if expr:match("^@") then 50 if expr:match("^@") then
51 return "\"..stanza.attr["..(%q):format(expr:sub(2)).."]..\""; 51 return "\"..stanza.attr["..("%q"):format(expr:sub(2)).."]..\"";
52 end 52 end
53 return "\"..stanza:find("..("%q"):format(expr:sub(2, -2))..")..\""; 53 return "\"..stanza:find("..("%q"):format(expr:sub(2, -2))..")..\"";
54 end) 54 end)
55 :gsub("$$(%a+)", extra or {}) 55 :gsub("$$(%a+)", extra or {})
56 :gsub([[^""%.%.]], "") 56 :gsub([[^""%.%.]], "")