optimize decrypt

first recv size < iv_len will cause decrypt error
This commit is contained in:
BreakWa11 2015-10-21 22:02:22 +08:00
parent 79260ff4ab
commit 041a5c1046
3 changed files with 17 additions and 11 deletions

View file

@ -8,6 +8,7 @@ import sys
from server_pool import ServerPool
import Config
import traceback
from shadowsocks import common
class DbTransfer(object):
@ -115,7 +116,7 @@ class DbTransfer(object):
allow = False
port = row['port']
passwd = row['passwd']
passwd = common.to_bytes(row['passwd'])
if port not in cur_servers:
cur_servers[port] = passwd