summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorMike Taylor <bear42@gmail.com>2015-04-11 19:49:43 -0400
committerMike Taylor <bear42@gmail.com>2015-04-11 19:49:43 -0400
commitcc145d20b077442b7d4118d4d2f4c27e1b0faf0c (patch)
treede848c1a7f60d42f427a5678aeab798e91ed386a /sleekxmpp/plugins
parent881d9040c48417bc2e21922fead9e4213b2fab6d (diff)
parente94a73553d808f13708490024f73d4a5ca5a8bb3 (diff)
downloadslixmpp-cc145d20b077442b7d4118d4d2f4c27e1b0faf0c.tar.gz
slixmpp-cc145d20b077442b7d4118d4d2f4c27e1b0faf0c.tar.bz2
slixmpp-cc145d20b077442b7d4118d4d2f4c27e1b0faf0c.tar.xz
slixmpp-cc145d20b077442b7d4118d4d2f4c27e1b0faf0c.zip
Merge pull request #297 from keith-gray-powereng/develop
Fixed a unicode error in xep_0065 on Python 3
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0065/proxy.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0065/proxy.py b/sleekxmpp/plugins/xep_0065/proxy.py
index fdd9f97e..d890b57a 100644
--- a/sleekxmpp/plugins/xep_0065/proxy.py
+++ b/sleekxmpp/plugins/xep_0065/proxy.py
@@ -206,7 +206,7 @@ class XEP_0065(base_plugin):
# Though this should not be neccessary remove the closed session anyway
with self._sessions_lock:
if sid in self._sessions:
- log.warn(('SOCKS5 session with sid = "%s" was not ' +
+ log.warn(('SOCKS5 session with sid = "%s" was not ' +
'removed from _sessions by sock.close()') % sid)
del self._sessions[sid]
@@ -240,9 +240,9 @@ class XEP_0065(base_plugin):
# The hostname MUST be SHA1(SID + Requester JID + Target JID)
# where the output is hexadecimal-encoded (not binary).
digest = sha1()
- digest.update(sid)
- digest.update(str(requester))
- digest.update(str(target))
+ digest.update(sid.encode('utf-8'))
+ digest.update(str(requester).encode('utf-8'))
+ digest.update(str(target).encode('utf-8'))
dest = digest.hexdigest()