diff --git a/src/plugins/plugin_sec_otr.py b/src/plugins/plugin_sec_otr.py index 92aebda5..6610fc5e 100644 --- a/src/plugins/plugin_sec_otr.py +++ b/src/plugins/plugin_sec_otr.py @@ -80,7 +80,7 @@ class Context(potr.context.Context): def setState(self, state): old_state = self.state super(Context, self).setState(state) - log.debug(u"setState: %s (old_state=%s) " % (state, old_state)) + log.debug(u"setState: %s (old_state=%s)" % (state, old_state)) if state == potr.context.STATE_PLAINTEXT: feedback = _(u"/!\\ conversation with %(other_jid)s is now UNENCRYPTED") % {'other_jid': self.peer.full()} @@ -116,7 +116,9 @@ class Account(potr.context.Account): def __init__(self, host, client): log.debug(u"new account: %s" % client.jid) - super(Account, self).__init__(client.jid, "xmpp", 1024) + if not client.jid.resource: + log.warning("Account created without resource") + super(Account, self).__init__(unicode(client.jid), "xmpp", 1024) self.host = host self.client = client @@ -147,6 +149,8 @@ class ContextManager(object): def getContextForUser(self, other): log.debug(u"getContextForUser [%s]" % other) + if not other.resource: + log.warning("getContextForUser called with a bare jid") return self.startContext(other) diff --git a/src/plugins/plugin_xep_0045.py b/src/plugins/plugin_xep_0045.py index ddfbcac8..c0eeeb4a 100755 --- a/src/plugins/plugin_xep_0045.py +++ b/src/plugins/plugin_xep_0045.py @@ -220,9 +220,9 @@ class XEP_0045(object): def _configureRoomMenu(self, menu_data, profile): """Return room configuration form + @param menu_data: %(menu_data)s @param profile: %(doc_profile)s - """ try: room_jid = jid.JID(menu_data['room_jid'])