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:
authorlovetox <philipp@hoerist.com>2020-05-26 23:22:24 +0300
committerlovetox <philipp@hoerist.com>2020-05-26 23:24:20 +0300
commit123d35d638b72ba7314ce0ee16570c1bacc09543 (patch)
treec72d9c2a21e9fb32e9210f41fc571abf4ee15843 /nbxmpp
parentae1ebaddb949e5b74c34e22fec530b30aa4aa00a (diff)
MUC: Add check for another case of malformed presence
Diffstat (limited to 'nbxmpp')
-rw-r--r--nbxmpp/modules/muc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nbxmpp/modules/muc.py b/nbxmpp/modules/muc.py
index 0b02904..7ebf98d 100644
--- a/nbxmpp/modules/muc.py
+++ b/nbxmpp/modules/muc.py
@@ -161,6 +161,12 @@ class MUC(BaseModule):
self._log.warning(stanza)
raise NodeProcessed
+ if (properties.muc_user.role.is_none and
+ not properties.type.is_unavailable):
+ self._log.warning('Malformed Stanza')
+ self._log.warning(stanza)
+ raise NodeProcessed
+
def _process_groupchat_message(self, _client, stanza, properties):
properties.from_muc = True
properties.muc_jid = properties.jid.copy()