mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-09 23:54:09 -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:
|
||||
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
|
||||
return str + ((32 - len(str) % 32) * padding_string)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user