Author: bct Date: 2008-08-01 02:39:40 +0200 (Fri, 01 Aug 2008) New Revision: 10100
Modified: trunk/src/common/stanza_session.py Log: handle XEP-0200 encrypted messages with extra unencrypted bodies
Modified: trunk/src/common/stanza_session.py =================================================================== --- trunk/src/common/stanza_session.py 2008-07-31 20:12:23 UTC (rev 10099) +++ trunk/src/common/stanza_session.py 2008-08-01 00:39:40 UTC (rev 10100) @@ -281,6 +281,11 @@ return self.encrypter.encrypt(padded)
def decrypt_stanza(self, stanza): + # delete the unencrypted explanation body, if it exists + orig_body = stanza.getTag('body') + if orig_body: + stanza.delChild(orig_body) + c = stanza.getTag(name='c', namespace='http://www.xmpp.org/extensions/xep-0200.html#ns')