changeset 8212069223e3 in /home/hg/repos/gajim
branches: gtk3 details:http://hg.gajim.org/gajim?cmd=changeset;node=8212069223e3 description: ignore wrong incoming stanza. Fixes #7416
diffstat:
src/common/jingle.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r 3a5cb0ed4861 -r 8212069223e3 src/common/jingle.py --- a/src/common/jingle.py Tue Aug 13 13:54:16 2013 +0200 +++ b/src/common/jingle.py Tue Aug 13 14:37:56 2013 +0200 @@ -75,7 +75,11 @@ 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)