changeset 2564:240985f7d1f7

mod_firewall: SUBSCRIBED: Only check roster if 'to' address has a nodepart (fixes traceback)
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 Feb 2017 09:51:43 +0000
parents 2f1e25706f81
children fc53165d8afe
files mod_firewall/conditions.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua	Fri Feb 24 09:50:49 2017 +0000
+++ b/mod_firewall/conditions.lib.lua	Fri Feb 24 09:51:43 2017 +0000
@@ -114,7 +114,7 @@
 end
 
 function condition_handlers.SUBSCRIBED()
-	return "rostermanager.is_contact_subscribed(to_node, to_host, bare_from)",
+	return "(to_node and rostermanager.is_contact_subscribed(to_node, to_host, bare_from))",
 	       { "rostermanager", "split_to", "bare_from" };
 end