mod_firewall/conditions.lib.lua
changeset 2367 12b78170b76c
parent 2366 c065ab67d807
child 2390 00eed68f63bf
--- a/mod_firewall/conditions.lib.lua	Tue Nov 15 14:57:40 2016 +0000
+++ b/mod_firewall/conditions.lib.lua	Tue Nov 15 14:58:16 2016 +0000
@@ -116,7 +116,7 @@
 			error("Stanza path does not return a string (append # for text content or @name for value of named attribute)", 0);
 		end
 		if is_pattern_match ~= "" then
-			return ("stanza:find(%q):match(%q)"):format(path:match("(.-)~=(.*)"));
+			return ("(stanza:find(%q) or ''):match(%q)"):format(path:match("(.-)~=(.*)"));
 		else
 			return ("stanza:find(%q) == %q"):format(path:match("(.-)=(.*)"));
 		end