ignore wrong incoming stanza. Fixes #7416

This commit is contained in:
Yann Leboulanger 2013-08-13 14:37:56 +02:00
parent 2dffcd4ed6
commit 89d0ec58f4
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ class ConnectionJingle(object):
adequatelly.
"""
# get data
jid = helpers.get_full_jid_from_iq(stanza)
try:
jid = helpers.get_full_jid_from_iq(stanza)
except helpers.InvalidFormat:
log.warn('Invalid JID: %s, ignoring it' % stanza.getFrom())
return
id_ = stanza.getID()
if (jid, id_) in self.__iq_responses.keys():
self.__iq_responses[(jid, id_)].on_stanza(stanza)