Fixed an issue where server names with special characters are not displayed correctly in the process tab. Fixes #7695

This commit is contained in:
Aditya Toshniwal
2022-09-15 16:43:37 +05:30
committed by Akshay Joshi
parent 769f58970e
commit 04b1e26041
9 changed files with 10 additions and 22 deletions

View File

@@ -40,4 +40,5 @@ Bug fixes
| `Issue #7656 <https://redmine.postgresql.org/issues/7656>`_ - Fixed an issue where textarea of the JSON Editor does not resize with dialog.
| `Issue #7663 <https://redmine.postgresql.org/issues/7663>`_ - Fixed ModuleNotFoundError when running setup.py to load/dump servers.
| `Issue #7693 <https://redmine.postgresql.org/issues/7693>`_ - Replace the language selection 'Brazilian' with 'Portuguese (Brazilian).
| `Issue #7695 <https://redmine.postgresql.org/issues/7695>`_ - Fixed an issue where server names with special characters are not displayed correctly in the process tab.
| `Issue #7709 <https://redmine.postgresql.org/issues/7709>`_ - Fixed an issue where ERD throws an error if variable is added to the column.

View File

@@ -61,7 +61,7 @@ class AuthenticateModule(PgAdminModule):
blueprint = AuthenticateModule(MODULE_NAME, __name__, static_url_path='')
@blueprint.route('/login', endpoint='login', methods=['POST'])
@blueprint.route('/login', endpoint='login', methods=['GET', 'POST'])
def login():
"""
Entry point for all the authentication sources.

View File

@@ -48,7 +48,7 @@ def init_app(app):
blueprint = Oauth2Module(MODULE_NAME, __name__, static_url_path='')
@blueprint.route('/authorize', endpoint="authorize",
methods=['POST'])
methods=['GET', 'POST'])
@pgCSRFProtect.exempt
def oauth_authorize():
auth_obj = session['auth_obj']
@@ -66,7 +66,7 @@ def init_app(app):
return redirect(get_post_login_redirect())
@blueprint.route('/logout', endpoint="logout",
methods=['POST'])
methods=['GET', 'POST'])
@pgCSRFProtect.exempt
def oauth_logout():
if not current_user.is_authenticated:

View File

@@ -923,7 +923,7 @@ def signal_runtime():
if hasattr(config, 'SECURITY_CHANGEABLE') and config.SECURITY_CHANGEABLE:
@blueprint.route("/change_password", endpoint="change_password",
methods=['POST'])
methods=['GET', 'POST'])
@pgCSRFProtect.exempt
@login_required
def change_password():
@@ -1011,7 +1011,7 @@ if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
user=user, token=token)
@blueprint.route("/reset_password", endpoint="forgot_password",
methods=['POST'])
methods=['GET', 'POST'])
@pgCSRFProtect.exempt
@anonymous_user_required
def forgot_password():

View File

@@ -181,7 +181,7 @@ class Message(IProcessDesc):
if s is None:
return gettext("Not available")
return html.safe_str("{0} ({1}:{2})".format(s.name, s.host, s.port))
return "{0} ({1}:{2})".format(s.name, s.host, s.port)
def details(self, cmd, args):
return {

View File

@@ -115,9 +115,6 @@ class BackupMessage(IProcessDesc):
host = manager.local_bind_host if manager.use_ssh_tunnel else s.host
port = manager.local_bind_port if manager.use_ssh_tunnel else s.port
s.name = html.safe_str(s.name)
host = html.safe_str(host)
port = html.safe_str(port)
return "{0} ({1}:{2})".format(s.name, host, port)
@property
@@ -140,9 +137,7 @@ class BackupMessage(IProcessDesc):
return _(
"Backing up an object on the server '{0}' "
"from database '{1}'"
).format(server_name,
html.safe_str(self.database)
)
).format(server_name, self.database)
if self.backup_type == BACKUP.GLOBALS:
return _("Backing up the global objects on "
"the server '{0}'").format(

View File

@@ -98,7 +98,7 @@ class IEMessage(IProcessDesc):
if s is None:
return _("Not available")
return html.safe_str("{0} ({1}:{2})".format(s.name, s.host, s.port))
return "{0} ({1}:{2})".format(s.name, s.host, s.port)
@property
def message(self):
@@ -107,9 +107,7 @@ class IEMessage(IProcessDesc):
"Copying table data '{0}.{1}' on database '{2}' "
"and server '{3}'"
).format(
html.safe_str(self.schema),
html.safe_str(self.table),
html.safe_str(self.database),
self.schema, self.table, self.database,
self.get_server_name()
)

View File

@@ -73,9 +73,6 @@ class Message(IProcessDesc):
host = manager.local_bind_host if manager.use_ssh_tunnel else s.host
port = manager.local_bind_port if manager.use_ssh_tunnel else s.port
s.name = html.safe_str(s.name)
host = html.safe_str(host)
port = html.safe_str(port)
return "{0} ({1}:{2})".format(s.name, host, port)
def get_op(self):

View File

@@ -89,9 +89,6 @@ class RestoreMessage(IProcessDesc):
host = manager.local_bind_host if manager.use_ssh_tunnel else s.host
port = manager.local_bind_port if manager.use_ssh_tunnel else s.port
s.name = html.safe_str(s.name)
host = html.safe_str(host)
port = html.safe_str(port)
return "{0} ({1}:{2})".format(s.name, host, port)
@property