mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-10 08:04:36 -06:00
Fix password encryption with non-alpha passwords. Fixes #1371
This commit is contained in:
parent
5f3511ce39
commit
c702ef9c48
@ -48,9 +48,8 @@ def decrypt(ciphertext, key):
|
|||||||
iv = ciphertext[:AES.block_size]
|
iv = ciphertext[:AES.block_size]
|
||||||
cipher = AES.new(pad(key), AES.MODE_CFB, iv)
|
cipher = AES.new(pad(key), AES.MODE_CFB, iv)
|
||||||
decrypted = cipher.decrypt(ciphertext[AES.block_size:])
|
decrypted = cipher.decrypt(ciphertext[AES.block_size:])
|
||||||
l = decrypted.count(padding_string)
|
|
||||||
|
|
||||||
return decrypted[:len(decrypted)-l]
|
return decrypted
|
||||||
|
|
||||||
|
|
||||||
def pad(str):
|
def pad(str):
|
||||||
|
Loading…
Reference in New Issue
Block a user