mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Do not decrypt the password when the password is 'None'. Fixes #2765
This should avoid the common but harmless exception "ValueError: IV must be 16 bytes long while decrypting the password."
This commit is contained in:
committed by
Dave Page
parent
e64bc2a821
commit
1dd1c10255
@@ -1653,10 +1653,14 @@ class ServerManager(object):
|
||||
|
||||
res = dict()
|
||||
res['sid'] = self.sid
|
||||
if hasattr(self.password, 'decode'):
|
||||
res['password'] = self.password.decode('utf-8')
|
||||
if hasattr(self, 'password') and self.password:
|
||||
# If running under PY2
|
||||
if hasattr(self.password, 'decode'):
|
||||
res['password'] = self.password.decode('utf-8')
|
||||
else:
|
||||
res['password'] = str(self.password)
|
||||
else:
|
||||
res['password'] = str(self.password)
|
||||
res['password'] = self.password
|
||||
|
||||
connections = res['connections'] = dict()
|
||||
|
||||
|
Reference in New Issue
Block a user