From c48f4c409f0b7681cb7734ba90d9e2675db7d44a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 17 May 2009 17:59:00 +0200 Subject: [PATCH] prevent traceback when negociating E2E. see #5015 --- src/common/stanza_session.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/stanza_session.py b/src/common/stanza_session.py index ee0d1fe95..d5a5ec9e7 100644 --- a/src/common/stanza_session.py +++ b/src/common/stanza_session.py @@ -886,7 +886,10 @@ class EncryptedStanzaSession(StanzaSession): srses = secrets.secrets().retained_secrets(self.conn.name, self.jid.getStripped()) - srshash = base64.b64decode(form.getField('srshash')) + try: + srshash = base64.b64decode(form['srshash']) + except IndexError: + return for s in srses: secret = s[0]