Ensure object names in external process dialogues are properly escaped. Fixes #3872

This commit is contained in:
Murtuza Zabuawala
2019-01-24 16:34:18 +00:00
committed by Dave Page
parent 42c7ae372f
commit d9fc9fdc4d
9 changed files with 121 additions and 56 deletions

View File

@@ -73,7 +73,6 @@ class RestoreMessage(IProcessDesc):
def cmdArg(x):
if x:
x = html.safe_str(x)
x = x.replace('\\', '\\\\')
x = x.replace('"', '\\"')
x = x.replace('""', '\\"')
@@ -106,7 +105,11 @@ class RestoreMessage(IProcessDesc):
name, host, port = self.get_server_details()
return _("Restoring backup on the server '{0}'").format(
"{0} ({1}:{2})".format(name, host, port),
"{0} ({1}:{2})".format(
html.safe_str(name),
html.safe_str(host),
html.safe_str(port)
),
)
@property