Skip to content

Commit

Permalink
Ensure server connection is successful for sslrootcert=system in serv…
Browse files Browse the repository at this point in the history
…er configuration. #7907
  • Loading branch information
yogeshmahajan-1903 authored Oct 14, 2024
1 parent 9be0fef commit 2cc8f5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class FileTreeItem extends React.Component<IItemRendererXProps & IItemRen
? 'file'
: 'directory';

if (this.props.item.parent?.path) {
if (this.props.item.parent?.parent && this.props.item.parent?.path) {
this.props.item.resolvedPathCache = this.props.item.parent.path + '/' + this.props.item._metadata.data.id;
}

Expand Down
7 changes: 5 additions & 2 deletions web/pgadmin/utils/driver/psycopg3/server_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,14 @@ def create_connection_string(self, database, user, password=None):
with_complete_path = False
orig_value = value
# Getting complete file path if the key is one of the below.
if key in ['passfile', 'sslcert', 'sslkey', 'sslrootcert',
'sslcrl', 'sslcrldir']:
if key in ['passfile', 'sslcert', 'sslkey','sslcrl',
'sslcrldir']:
with_complete_path = True
value = get_complete_file_path(value)

if key == 'sslrootcert' and value != 'system':
dsn_args[key] = get_complete_file_path(value)

# If key is hostaddr and ssh tunnel is in use don't overwrite.
if key == 'hostaddr' and self.use_ssh_tunnel:
continue
Expand Down

0 comments on commit 2cc8f5f

Please sign in to comment.