Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/nbxmpp
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2020-02-14 18:02:29 +0300
committerPhilipp Hörist <philipp@hoerist.com>2020-02-14 18:02:29 +0300
commitdf4f49c8bc8343038cd2f3ffd7de9382a132166e (patch)
tree1269467de645fcd0ff7f90f65ad4b1734711d666 /nbxmpp
parent09c2edd3578ae6910c4b9400718ee4a5ee92ecd9 (diff)
Blocking: Don't fail on malformed stanza
Fixes #99
Diffstat (limited to 'nbxmpp')
-rw-r--r--nbxmpp/modules/blocking.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nbxmpp/modules/blocking.py b/nbxmpp/modules/blocking.py
index fe54c4c..5fac9e6 100644
--- a/nbxmpp/modules/blocking.py
+++ b/nbxmpp/modules/blocking.py
@@ -47,6 +47,9 @@ class Blocking:
return raise_error(log.info, stanza)
blocklist = stanza.getTag('blocklist', namespace=NS_BLOCKING)
+ if blocklist is None:
+ return raise_error(log.warning, stanza, 'stanza-malformed')
+
for item in blocklist.getTags('item'):
blocked.append(item.getAttr('jid'))