From 33dd76c29f95b1acc8a4de256505c625521884c6 Mon Sep 17 00:00:00 2001 From: zhengxie Date: Fri, 7 Dec 2018 13:09:25 +0800 Subject: [PATCH] Replace pycrypto with pycryptodome --- dev-requirements.txt | 2 +- seahub/utils/hasher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 529f2514dd..56eacb74e2 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -5,5 +5,5 @@ transifex-client raven==5.0.0 mysqlclient==1.3.12 -pycrypto==2.6.1 +pycryptodome==3.7.2 psd-tools==1.4 diff --git a/seahub/utils/hasher.py b/seahub/utils/hasher.py index 2aa29d9998..eac3d16922 100644 --- a/seahub/utils/hasher.py +++ b/seahub/utils/hasher.py @@ -35,7 +35,7 @@ class AESPasswordHasher: if not secret: secret = settings.SECRET_KEY[:BLOCK_SIZE] - self.cipher = AES.new(secret) + self.cipher = AES.new(secret, AES.MODE_ECB) def encode(self, password): return "%s$%s" % (self.algorithm, EncodeAES(self.cipher, password))