fix for proper escaping of conflicting chars in rdp credential redirection

This commit is contained in:
danitorregrosa 2020-11-10 14:05:56 +01:00
parent 6d9a6baa2a
commit 08038b5b90
2 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,9 @@ class RDPTransport(BaseRDPTransport):
ci = self.getConnectionInfo(userService, user, password)
username, password, domain = ci['username'], ci['password'], ci['domain']
# escape conflicting chars
password = password.replace('\\', '\\\\').replace('"', '\\"').replace("'", "\\'")
# width, height = CommonPrefs.getWidthHeight(prefs)
# depth = CommonPrefs.getDepth(prefs)
width, height = self.screenSize.value.split('x')

View File

@ -124,6 +124,9 @@ class TRDPTransport(BaseRDPTransport):
ci = self.getConnectionInfo(userService, user, password)
username, password, domain = ci['username'], ci['password'], ci['domain']
# escape conflicting chars
password = password.replace('\\', '\\\\').replace('"', '\\"').replace("'", "\\'")
# width, height = CommonPrefs.getWidthHeight(prefs)
# depth = CommonPrefs.getDepth(prefs)
width, height = self.screenSize.value.split('x')