Comparison

core/modulemanager.lua @ 929:b4f2ca7f6f00

Fixed: modulemanager: IQs with extended elements in the default namespace could cause backtraces (related to issue #74)
author Waqas Hussain <waqas20@gmail.com>
date Mon, 30 Mar 2009 02:56:34 +0500
parent 896:2c0b9e3c11c3
child 1069:034e345c0f8d
comparison
equal deleted inserted replaced
928:92288c13d7bc 929:b4f2ca7f6f00
202 202
203 function handle_stanza(host, origin, stanza) 203 function handle_stanza(host, origin, stanza)
204 local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns, origin.type; 204 local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns, origin.type;
205 if name == "iq" and xmlns == "jabber:client" then 205 if name == "iq" and xmlns == "jabber:client" then
206 if stanza.attr.type == "get" or stanza.attr.type == "set" then 206 if stanza.attr.type == "get" or stanza.attr.type == "set" then
207 xmlns = stanza.tags[1].attr.xmlns; 207 xmlns = stanza.tags[1].attr.xmlns or "jabber:client";
208 log("debug", "Stanza of type %s from %s has xmlns: %s", name, origin_type, xmlns); 208 log("debug", "Stanza of type %s from %s has xmlns: %s", name, origin_type, xmlns);
209 else 209 else
210 log("debug", "Discarding %s from %s of type: %s", name, origin_type, stanza.attr.type); 210 log("debug", "Discarding %s from %s of type: %s", name, origin_type, stanza.attr.type);
211 return true; 211 return true;
212 end 212 end