# HG changeset patch # User Emmanuel Gil Peyrot # Date 1528487982 -7200 # Node ID 7a3ac037e57fe40d59e24b89e5afc23468a14d35 # Parent 06e07b483805867b812efdff9e4ab298482bb1ba mod_cache_c2s_caps: Fix traceback on invalid payload in disco#info result. diff -r 06e07b483805 -r 7a3ac037e57f mod_cache_c2s_caps/mod_cache_c2s_caps.lua --- a/mod_cache_c2s_caps/mod_cache_c2s_caps.lua Fri Jun 08 17:56:54 2018 +0200 +++ b/mod_cache_c2s_caps/mod_cache_c2s_caps.lua Fri Jun 08 21:59:42 2018 +0200 @@ -10,11 +10,15 @@ local function iq_result_handler(event) local origin, stanza = event.origin, event.stanza; + + local query = stanza:get_child("query", "http://jabber.org/protocol/disco#info"); + if not query then + origin.log("debug", "Wrong iq payload in disco#info result: %s", stanza); + return; + end + local from = stanza.attr.from; local id = stanza.attr.id; - - local query = stanza:get_child("query", "http://jabber.org/protocol/disco#info"); - local node_string = query.attr.node; local node_query = iq_node_map[from..id]; if node_string == nil then