From c702ef9c4864afa40056ec85983774a948a8bfab Mon Sep 17 00:00:00 2001 From: Murtuza Zabuawala Date: Thu, 16 Jun 2016 20:32:57 +0100 Subject: [PATCH] Fix password encryption with non-alpha passwords. Fixes #1371 --- web/pgadmin/utils/crypto.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/pgadmin/utils/crypto.py b/web/pgadmin/utils/crypto.py index be1b52db5..3301eef1b 100644 --- a/web/pgadmin/utils/crypto.py +++ b/web/pgadmin/utils/crypto.py @@ -48,9 +48,8 @@ def decrypt(ciphertext, key): iv = ciphertext[:AES.block_size] cipher = AES.new(pad(key), AES.MODE_CFB, iv) decrypted = cipher.decrypt(ciphertext[AES.block_size:]) - l = decrypted.count(padding_string) - return decrypted[:len(decrypted)-l] + return decrypted def pad(str):