From 8c7ee7a12b4f40024df8e58fbe10244c7442132f Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 28 Jul 2013 20:50:11 +0200 Subject: [PATCH] fix encoding issue --- src/common/socks5.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/socks5.py b/src/common/socks5.py index 00388502f..e4fbdfb4c 100644 --- a/src/common/socks5.py +++ b/src/common/socks5.py @@ -875,9 +875,9 @@ class Socks5: Get sha of sid + Initiator jid + Target jid """ if self.file_props.is_a_proxy: - return hashlib.sha1('%s%s%s' % (self.sid, - self.file_props.proxy_sender, self.file_props.proxy_receiver) - ).hexdigest() + return hashlib.sha1(('%s%s%s' % (self.sid, + self.file_props.proxy_sender, self.file_props.proxy_receiver)).\ + encode('utf-8')).hexdigest() return hashlib.sha1(('%s%s%s' % (self.sid, self.initiator, self.target)).encode('utf-8')).hexdigest()