diff --git a/Dockerfile b/Dockerfile index ea22e7eba..a7df83a8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -218,7 +218,7 @@ RUN apk add --no-cache \ chown pgadmin:root /pgadmin4/config_distro.py && \ chmod g=u /pgadmin4/config_distro.py && \ chmod g=u /etc/passwd && \ - setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.13 && \ + setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.12 && \ echo "pgadmin ALL = NOPASSWD: /usr/sbin/postfix start" > /etc/sudoers.d/postfix && \ echo "pgadminr ALL = NOPASSWD: /usr/sbin/postfix start" >> /etc/sudoers.d/postfix diff --git a/docs/en_US/release_notes_9_0.rst b/docs/en_US/release_notes_9_0.rst index 756ad2de3..3a6dd3fc8 100644 --- a/docs/en_US/release_notes_9_0.rst +++ b/docs/en_US/release_notes_9_0.rst @@ -46,3 +46,4 @@ Bug fixes | `Issue #8299 `_ - Ensure master password pop up is not shown on setting MASTER_PASSWORD_REQUIRED to false. | `Issue #8309 `_ - Remove the option "With no data (concurrently)" from Refresh MATERIALIZED VIEW context menu. | `Issue #8320 `_ - Fix an issue where wrong information is shown after using the filter on the Dashboard> State tab. + | `Issue #8365 `_ - Fixed an issue where PSQL tool is not opening if database name have HTML characters in the name. \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/__init__.py index 2a47cd131..c72a78662 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/__init__.py @@ -34,7 +34,6 @@ from pgadmin.tools.sqleditor.utils.query_history import QueryHistory from pgadmin.tools.schema_diff.node_registry import SchemaDiffRegistry from pgadmin.model import db, Server, Database -from pgadmin.browser.utils import underscore_escape from pgadmin.utils.constants import TWO_PARAM_STRING @@ -1074,7 +1073,7 @@ class DatabaseView(PGChildNodeView): status, errmsg = conn.connect() return internal_server_error( - errormsg=underscore_escape(msg)) + errormsg=msg) return make_json_response(success=1) diff --git a/web/pgadmin/utils/driver/psycopg3/connection.py b/web/pgadmin/utils/driver/psycopg3/connection.py index c3ca4fa42..019cff944 100644 --- a/web/pgadmin/utils/driver/psycopg3/connection.py +++ b/web/pgadmin/utils/driver/psycopg3/connection.py @@ -40,6 +40,7 @@ from pgadmin.utils.master_password import get_crypt_key from io import StringIO from pgadmin.utils.locker import ConnectionLocker from pgadmin.utils.driver import get_driver +from pgadmin.browser.utils import underscore_escape # On Windows, Psycopg is not compatible with the default ProactorEventLoop. @@ -1688,7 +1689,7 @@ Failed to reset the connection to the server due to following error: # if formatted_msg is false then return from the function if not formatted_msg: notices = self.get_notices() - errmsg = errmsg.replace('\n', '
') + errmsg = underscore_escape(errmsg).replace('\n', '
') return errmsg if notices == '' else notices + '\n' + errmsg # Do not append if error starts with `ERROR:` as most pg related