public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password
Date: Wed, 5 Jun 2019 10:43:36 +0530
Message-ID: <CAM9w-_mUCS=uqoqvV9kZvyHn2nGyLjHuG8Z5di0B=La_xugQ1g@mail.gmail.com> (raw)
Hi Hackers,
Attached is the patch to fix a regression of Master Password #4184 where
SSH tunnel connection using password is failing.
--
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] RM4320.patch (903B, 3-RM4320.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/driver/psycopg2/server_manager.py b/web/pgadmin/utils/driver/psycopg2/server_manager.py
index 424e536e..e6390475 100644
--- a/web/pgadmin/utils/driver/psycopg2/server_manager.py
+++ b/web/pgadmin/utils/driver/psycopg2/server_manager.py
@@ -469,8 +469,12 @@ WHERE db.oid = {0}""".format(did))
return False, gettext("Unauthorized request.")
if tunnel_password is not None and tunnel_password != '':
+ crypt_key_present, crypt_key = get_crypt_key()
+ if not crypt_key_present:
+ raise CryptKeyMissing()
+
try:
- tunnel_password = decrypt(tunnel_password, user.password)
+ tunnel_password = decrypt(tunnel_password, crypt_key)
# Handling of non ascii password (Python2)
if hasattr(str, 'decode'):
tunnel_password = \
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password
In-Reply-To: <CAM9w-_mUCS=uqoqvV9kZvyHn2nGyLjHuG8Z5di0B=La_xugQ1g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox