# HG changeset patch # User Goffi # Date 1561902750 -7200 # Node ID f44a95f566d21d2f54ff382f9953792475de5c7f # Parent bad0b4280b7742145a6739670e491d02d34af1ee core, plugin XEP-0045: fix crashes when changing URIs: When adding missing URIs in message, the "children" property was used instead of elements(). "children" not only return elements, and this was causing crashes. This may fix bug 294 rel 294 diff -r bad0b4280b77 -r f44a95f566d2 sat/core/xmpp.py --- a/sat/core/xmpp.py Sun Jun 30 15:52:27 2019 +0200 +++ b/sat/core/xmpp.py Sun Jun 30 15:52:30 2019 +0200 @@ -969,7 +969,7 @@ if message_elt.uri is None: # wokkel element parsing strip out root namespace message_elt.defaultUri = message_elt.uri = C.NS_CLIENT - for c in message_elt.children: + for c in message_elt.elements(): if c.uri is None: c.uri == C.NS_CLIENT elif message_elt.uri != C.NS_CLIENT: diff -r bad0b4280b77 -r f44a95f566d2 sat/plugins/plugin_xep_0045.py --- a/sat/plugins/plugin_xep_0045.py Sun Jun 30 15:52:27 2019 +0200 +++ b/sat/plugins/plugin_xep_0045.py Sun Jun 30 15:52:30 2019 +0200 @@ -1192,7 +1192,7 @@ # unexpected elements which break our workflow. log.warning(_(u"storing the unexpected message anyway, to avoid loss")) # we have to restore URI which are stripped by wokkel parsing - for c in message.element.children: + for c in message.element.elements(): if c.uri is None: c.uri = C.NS_CLIENT mess_data = self.client.messageProt.parseMessage(message.element)