Diff

mod_firewall/mod_firewall.lua @ 2416:ade918cd9ca7

mod_firewall: Only call rostermanager if username is available (fixes #796)
author Kim Alvefur <zash@zash.se>
date Tue, 13 Dec 2016 22:08:02 +0100
parent 2415:07d7036040ee
child 2418:ef95853cf900
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Tue Dec 13 16:57:16 2016 +0100
+++ b/mod_firewall/mod_firewall.lua	Tue Dec 13 22:08:02 2016 +0100
@@ -141,7 +141,7 @@
 		global_code = [[local rostermanager = require "core.rostermanager";]];
 	};
 	roster_entry = {
-		local_code = [[local roster_entry = (rostermanager.load_roster(to_node, to_host) or {})[bare_from];]];
+		local_code = [[local roster_entry = (to_node and rostermanager.load_roster(to_node, to_host) or {})[bare_from];]];
 		depends = { "rostermanager", "split_to", "bare_from" };
 	};
 };