changeset 2882:6f289283feb1

mod_firewall: Prevent traceback if no directed presence has been sent (fixes #1081)
author Kim Alvefur <zash@zash.se>
date Fri, 16 Feb 2018 07:54:35 +0100
parents 824b0d7fa883
children 7c16afc70d11
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 16 04:36:41 2018 +0100
+++ b/mod_firewall/conditions.lib.lua	Fri Feb 16 07:54:35 2018 +0100
@@ -277,7 +277,7 @@
 end
 
 function condition_handlers.SENT_DIRECTED_PRESENCE_TO_SENDER()
-	return "not not session.directed[from]", { "from" };
+	return "not not (session.directed and session.directed[from])", { "from" };
 end
 
 -- TO FULL JID?