public inbox for [email protected]help / color / mirror / Atom feed
[pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password 4+ messages / 3 participants [nested] [flat]
* [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password @ 2019-06-05 05:13 Aditya Toshniwal <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Aditya Toshniwal @ 2019-06-05 05:13 UTC (permalink / raw) To: pgadmin-hackers 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 = \ ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password @ 2019-06-05 06:41 Akshay Joshi <[email protected]> parent: Aditya Toshniwal <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Akshay Joshi @ 2019-06-05 06:41 UTC (permalink / raw) To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers Thanks patch applied. On Wed, Jun 5, 2019 at 10:44 AM Aditya Toshniwal < [email protected]> wrote: > 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" > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password @ 2019-06-25 05:59 Aditya Toshniwal <[email protected]> parent: Akshay Joshi <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Aditya Toshniwal @ 2019-06-25 05:59 UTC (permalink / raw) To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers Hi Hackers, Based on the latest comments on the RM, https://redmine.postgresql.org/issues/4320#change-16998 - Replaced server_manager.py on my Win 10 system - could login and run queries, etc - but eventually got "create_ssh_tunnel() missing 1 required positional argument: 'tunnel_password'",attached is the patch to fix the issue. Kindly review and consider this for the upcoming release. On Wed, Jun 5, 2019 at 12:11 PM Akshay Joshi <[email protected]> wrote: > Thanks patch applied. > > On Wed, Jun 5, 2019 at 10:44 AM Aditya Toshniwal < > [email protected]> wrote: > >> 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" >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > > *Sr. Software Architect* > *EnterpriseDB Software India Private Limited* > *Mobile: +91 976-788-8246* > -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" Attachments: [application/octet-stream] RM4320.part2.patch (848B, 3-RM4320.part2.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 ae1cc709..8ae46c2e 100644 --- a/web/pgadmin/utils/driver/psycopg2/server_manager.py +++ b/web/pgadmin/utils/driver/psycopg2/server_manager.py @@ -348,7 +348,9 @@ WHERE db.oid = {0}""".format(did)) # Check SSH Tunnel needs to be created if self.use_ssh_tunnel == 1 and \ not self.tunnel_created: - status, error = self.create_ssh_tunnel() + status, error = self.create_ssh_tunnel( + self.tunnel_password + ) # Check SSH Tunnel is alive or not. self.check_ssh_tunnel_alive() ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password @ 2019-06-25 11:06 Dave Page <[email protected]> parent: Aditya Toshniwal <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Dave Page @ 2019-06-25 11:06 UTC (permalink / raw) To: Aditya Toshniwal <[email protected]>; +Cc: Akshay Joshi <[email protected]>; pgadmin-hackers Thanks, committed. On Tue, Jun 25, 2019 at 2:00 AM Aditya Toshniwal < [email protected]> wrote: > Hi Hackers, > > Based on the latest comments on the RM, > https://redmine.postgresql.org/issues/4320#change-16998 - Replaced > server_manager.py on my Win 10 system - could login and run queries, etc - > but eventually got "create_ssh_tunnel() missing 1 required positional > argument: 'tunnel_password'",attached is the patch to fix the issue. > > Kindly review and consider this for the upcoming release. > > > > On Wed, Jun 5, 2019 at 12:11 PM Akshay Joshi < > [email protected]> wrote: > >> Thanks patch applied. >> >> On Wed, Jun 5, 2019 at 10:44 AM Aditya Toshniwal < >> [email protected]> wrote: >> >>> 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" >>> >> >> >> -- >> *Thanks & Regards* >> *Akshay Joshi* >> >> *Sr. Software Architect* >> *EnterpriseDB Software India Private Limited* >> *Mobile: +91 976-788-8246* >> > > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-06-25 11:06 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-06-05 05:13 [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password Aditya Toshniwal <[email protected]> 2019-06-05 06:41 ` Akshay Joshi <[email protected]> 2019-06-25 05:59 ` Aditya Toshniwal <[email protected]> 2019-06-25 11:06 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox