mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 15:26:46 -06:00
Returns an error when the driver couldn't decrypt the password, and
let the user know the issue.
This commit is contained in:
parent
bbf037f005
commit
c3b0e1dec4
@ -102,7 +102,15 @@ class Connection(BaseConnection):
|
||||
if user is None:
|
||||
return False, gettext("Unauthorized Request.")
|
||||
|
||||
password = decrypt(encpass, user.password)
|
||||
try:
|
||||
password = decrypt(encpass, user.password)
|
||||
except Exception as e:
|
||||
current_app.logger.exception(e)
|
||||
return False, \
|
||||
_("Failed to decrypt the saved password!\nError: {0}").format(
|
||||
str(e)
|
||||
)
|
||||
|
||||
# password is in bytes, for python3 we need it in string
|
||||
if isinstance(password, bytes):
|
||||
password = password.decode()
|
||||
|
Loading…
Reference in New Issue
Block a user