From e66cb54a5826373d542d17ff02ff147957f48fa3 Mon Sep 17 00:00:00 2001 From: Yogesh Mahajan Date: Thu, 23 Nov 2023 15:54:14 +0530 Subject: [PATCH] Ensure user is not prompted for password if server password is saved and server configuration has invalid pgpass file parameter. #6934 --- web/pgadmin/browser/server_groups/servers/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py index c014337af..af3605d4d 100644 --- a/web/pgadmin/browser/server_groups/servers/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/__init__.py @@ -36,7 +36,7 @@ from pgadmin.utils.preferences import Preferences from pgadmin.utils.constants import KEY_RING_SERVICE_NAME, \ KEY_RING_USERNAME_FORMAT, KEY_RING_TUNNEL_FORMAT, KEY_RING_DESKTOP_USER from .... import socketio as sio - +from pgadmin.utils import get_complete_file_path import keyring @@ -1543,7 +1543,8 @@ class ServerNode(PGChildNodeView): server.passexec_cmd is None and \ server.service is None: prompt_password = True - elif passfile_param and passfile_param != '': + elif passfile_param and passfile_param != '' and \ + get_complete_file_path(passfile_param): passfile = passfile_param else: if config.DISABLED_LOCAL_PASSWORD_STORAGE: