From 22cc658dca6b0564a5f33f7ca8c1fe33502cd649 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Wed, 18 Jan 2023 13:19:21 +0530 Subject: [PATCH] Fix failing import servers CLI due to vulnerability fix. #5751 --- web/pgadmin/utils/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/utils/__init__.py b/web/pgadmin/utils/__init__.py index cd86c022f..134c47c5c 100644 --- a/web/pgadmin/utils/__init__.py +++ b/web/pgadmin/utils/__init__.py @@ -574,8 +574,10 @@ def load_database_servers(input_file, selected_servers, # generate full path of file try: - file_path = filename_with_file_manager_path( - unquote(input_file), skip_permission_check=from_setup) + if from_setup: + file_path = unquote(input_file) + else: + file_path = filename_with_file_manager_path(unquote(input_file)) except Exception as e: return _handle_error(str(e), from_setup)