# HG changeset patch # User Goffi # Date 1544201210 -3600 # Node ID 57eac4fd0ec0e6182b4c162cf23085b7de74a03c # Parent 19000c506d0c7ded06f5843ea91c96589544c944 core (xmpp): check namespace in parseMessage, and accept empty namespace (happen with Wokkel) diff -r 19000c506d0c -r 57eac4fd0ec0 sat/core/xmpp.py --- a/sat/core/xmpp.py Fri Dec 07 17:43:43 2018 +0100 +++ b/sat/core/xmpp.py Fri Dec 07 17:46:50 2018 +0100 @@ -839,6 +839,7 @@ class SatMessageProtocol(xmppim.MessageProtocol): + def __init__(self, host): xmppim.MessageProtocol.__init__(self) self.host = host @@ -856,6 +857,15 @@ u"parseMessage used with a non stanza, ignoring: {xml}" .format(xml=message_elt.toXml()))) return {} + + if message_elt.uri is None: + # wokkel element parsing strip out root namespace + message_elt.uri = C.NS_CLIENT + elif message_elt.uri != C.NS_CLIENT: + log.warning(_( + u"received with a wrong namespace: {xml}" + .format(xml=message_elt.toXml()))) + client = self.parent message = {} subject = {}