Merge pull request #57 from danitorregrosa/escape-conflicting-chars-rdp-credential-redirection

fix for proper escaping of conflicting chars in rdp credential redire…
This commit is contained in:
Adolfo Gómez 2020-11-10 14:20:59 +01:00 committed by GitHub
commit 302b9a85d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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')