Diff

mod_firewall/conditions.lib.lua @ 2575:214b49d05ea1

mod_firewall: Fix TO/FROM ADMIN to use current (module) host
author Matthew Wild <mwild1@gmail.com>
date Sat, 25 Feb 2017 15:47:22 +0000
parent 2564:240985f7d1f7
child 2577:00cef058df8d
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua	Sat Feb 25 15:46:27 2017 +0000
+++ b/mod_firewall/conditions.lib.lua	Sat Feb 25 15:47:22 2017 +0000
@@ -164,11 +164,11 @@
 end
 
 function condition_handlers.FROM_ADMIN()
-	return ("is_admin(bare_from, from_host)"):format(host ~= "*" and host or nil), { "is_admin", "bare_from", "split_from" };
+	return ("is_admin(bare_from, current_host)"), { "is_admin", "bare_from", "current_host" };
 end
 
 function condition_handlers.TO_ADMIN()
-	return ("is_admin(bare_to, to_host)"):format(host ~= "*" and host or nil), { "is_admin", "bare_to", "split_to" };
+	return ("is_admin(bare_to, current_host)"), { "is_admin", "bare_to", "current_host" };
 end
 
 local day_numbers = { sun = 0, mon = 2, tue = 3, wed = 4, thu = 5, fri = 6, sat = 7 };