summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0065
diff options
context:
space:
mode:
authorRobert Robinson <rerobins@gmail.com>2015-09-18 13:30:30 -0600
committerRobert Robinson <rerobins@gmail.com>2015-09-18 13:30:30 -0600
commit5fc14de32e7fbd4e33a0e1ed92d8fb23871a2a2d (patch)
treed21287dbbb7882b766098e0a81c0d1d3677d28d3 /sleekxmpp/plugins/xep_0065
parente5582694c07236e6830c20361840360a1dde37f3 (diff)
parentd245558fd5eeee4fa34731ccea47c4c3132d805f (diff)
downloadslixmpp-5fc14de32e7fbd4e33a0e1ed92d8fb23871a2a2d.tar.gz
slixmpp-5fc14de32e7fbd4e33a0e1ed92d8fb23871a2a2d.tar.bz2
slixmpp-5fc14de32e7fbd4e33a0e1ed92d8fb23871a2a2d.tar.xz
slixmpp-5fc14de32e7fbd4e33a0e1ed92d8fb23871a2a2d.zip
Merge pull request #3 from fritzy/develop
Merge to fritzy_master
Diffstat (limited to 'sleekxmpp/plugins/xep_0065')
-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()