summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0065
diff options
context:
space:
mode:
authorSangeeth Saravanaraj <sangeeth@riptideio.com>2015-04-28 16:53:40 +0530
committerSangeeth Saravanaraj <sangeeth@riptideio.com>2015-04-28 16:53:40 +0530
commit80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb (patch)
treeecb5905d19a563b4e6fe864afd0122321bf7cea1 /sleekxmpp/plugins/xep_0065
parent904480712157d762d35de16ce55202d641a56b3c (diff)
parent842157a6cc25d9e85e6e31b3cf3349ba83ece101 (diff)
downloadslixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.tar.gz
slixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.tar.bz2
slixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.tar.xz
slixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.zip
Merge remote-tracking branch 'origin/develop' into xep_0332
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()