ignore <iq> without an ID. They are required by RFC. Fixes #5122

This commit is contained in:
Yann Leboulanger 2009-06-29 07:57:10 +02:00
parent 06cf27f6c4
commit c739465890
1 changed files with 3 additions and 0 deletions

View File

@ -867,6 +867,9 @@ class ConnectionDisco:
gajim.transport_type[jid] = transport_type
gajim.logger.save_transport_type(jid, transport_type)
id_ = iq_obj.getID()
if id_ is None:
log.warn('Invalid IQ received without an ID. Ignoring it: %s' % iq_obj)
return
if not identities: # ejabberd doesn't send identities when we browse online users
#FIXME: see http://www.jabber.ru/bugzilla/show_bug.cgi?id=225
identities = [{'category': 'server', 'type': 'im', 'name': node}]