Diff

mod_firewall/conditions.lib.lua @ 2577:00cef058df8d

mod_firewall: TO/FROM ADMIN OF: Fix string quoting
author Matthew Wild <mwild1@gmail.com>
date Sat, 25 Feb 2017 16:53:45 +0000
parent 2575:214b49d05ea1
child 2582:ac3140cd89a2
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua	Sat Feb 25 15:48:20 2017 +0000
+++ b/mod_firewall/conditions.lib.lua	Sat Feb 25 16:53:45 2017 +0000
@@ -156,11 +156,11 @@
 end
 
 function condition_handlers.FROM_ADMIN_OF(host)
-	return ("is_admin(bare_from, %s)"):format(host ~= "*" and host or nil), { "is_admin", "bare_from" };
+	return ("is_admin(bare_from, %s)"):format(host ~= "*" and metaq(host) or nil), { "is_admin", "bare_from" };
 end
 
 function condition_handlers.TO_ADMIN_OF(host)
-	return ("is_admin(bare_to, %s)"):format(host ~= "*" and host or nil), { "is_admin", "bare_to" };
+	return ("is_admin(bare_to, %s)"):format(host ~= "*" and metaq(host) or nil), { "is_admin", "bare_to" };
 end
 
 function condition_handlers.FROM_ADMIN()