public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin][patch] No password supplied on auto detected servers
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin][patch] No password supplied on auto detected servers
@ 2021-05-14 09:15 Aditya Toshniwal <[email protected]>
  2021-05-14 09:52 ` Re: [pgAdmin][patch] No password supplied on auto detected servers Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Aditya Toshniwal @ 2021-05-14 09:15 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Attached patch fixed "No password supplied" error occurring on
auto-detected servers.
Please review.

-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] noPassSupplied.patch (1.5K, 3-noPassSupplied.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py
index 0d32bf4d3..f4165c32d 100644
--- a/web/pgadmin/browser/server_groups/servers/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/__init__.py
@@ -1362,7 +1362,8 @@ class ServerNode(PGChildNodeView):
                 except Exception as e:
                     current_app.logger.exception(e)
                     return internal_server_error(errormsg=str(e))
-        if 'password' not in data and server.kerberos_conn is False:
+        if 'password' not in data and (server.kerberos_conn is False or
+                                       server.kerberos_conn is None):
             conn_passwd = getattr(conn, 'password', None)
             if conn_passwd is None and not server.save_password and \
                     server.passfile is None and server.service is None:
diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py
index edfa7a49f..bd90077b7 100644
--- a/web/pgadmin/model/__init__.py
+++ b/web/pgadmin/model/__init__.py
@@ -184,7 +184,7 @@ class Server(db.Model):
     tunnel_identity_file = db.Column(db.String(64), nullable=True)
     tunnel_password = db.Column(db.String(64), nullable=True)
     shared = db.Column(db.Boolean(), nullable=False)
-    kerberos_conn = db.Column(db.Boolean(), nullable=False)
+    kerberos_conn = db.Column(db.Boolean(), nullable=False, default=0)
 
     @property
     def serialize(self):


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin][patch] No password supplied on auto detected servers
  2021-05-14 09:15 [pgAdmin][patch] No password supplied on auto detected servers Aditya Toshniwal <[email protected]>
@ 2021-05-14 09:52 ` Akshay Joshi <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2021-05-14 09:52 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Fri, May 14, 2021 at 2:46 PM Aditya Toshniwal <
[email protected]> wrote:

> Hi Hackers,
>
> Attached patch fixed "No password supplied" error occurring on
> auto-detected servers.
> Please review.
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> <http://edbpostgres.com;
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-05-14 09:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 09:15 [pgAdmin][patch] No password supplied on auto detected servers Aditya Toshniwal <[email protected]>
2021-05-14 09:52 ` Akshay Joshi <[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