mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix encoding issue when saving servers. Fixes #2518
Patch by Khushboo, based on a suggested fix from Ladislav Jech
This commit is contained in:
parent
ed5c74affe
commit
301798d87a
@ -71,6 +71,10 @@ def pad(str):
|
|||||||
if str_len == 16 or str_len == 24 or str_len == 32:
|
if str_len == 16 or str_len == 24 or str_len == 32:
|
||||||
return str
|
return str
|
||||||
|
|
||||||
|
# Convert bytes to string (python3)
|
||||||
|
if not hasattr(str, 'decode'):
|
||||||
|
padding_string = padding_string.decode()
|
||||||
|
|
||||||
# Add padding to make key 32 bytes long
|
# Add padding to make key 32 bytes long
|
||||||
return str + ((32 - len(str) % 32) * padding_string)
|
return str + ((32 - len(str) % 32) * padding_string)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user