1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-10 01:17:59 +03:00

Fixed client & signature for RDP tunnel

This commit is contained in:
Adolfo Gómez García 2017-03-08 17:43:09 +01:00
parent bf85332492
commit 6e6d7a8795
2 changed files with 12 additions and 3 deletions

View File

@ -189,7 +189,8 @@ class UDSClient(QtGui.QMainWindow):
# * Script data # * Script data
# We test that the Script has correct signature, and them execute it with the parameters # We test that the Script has correct signature, and them execute it with the parameters
script, signature, params = res['script'].decode('base64').decode('bz2'), res['signature'], res['params'].decode('base64').decode('bz2') script, signature, params = res['script'].decode('base64').decode('bz2'), res['signature'], res['params'].decode('base64').decode('bz2')
if tools.verifySignature(script, signature) is False:
raise Exception('Invalid UDS code signature. Please, report to administrator')
self.stopAnim() self.stopAnim()
@ -199,6 +200,13 @@ class UDSClient(QtGui.QMainWindow):
QtCore.QTimer.singleShot(3000, self.endScript) QtCore.QTimer.singleShot(3000, self.endScript)
self.hide() self.hide()
if self.serverVersion <= OLD_METHOD_VERSION:
errorString = '<p>The server <b>{}</b> runs an old version of UDS:</p>'.format(host)
errorString += '<p>To avoid security issues, you must approve old UDS Version access.</p>'
if QtGui.QMessageBox.warning(None, 'ACCESS Warning', errorString, QtGui.QMessageBox.Yes | QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
raise Exception('Server not approved. Access denied.')
six.exec_(script, globals(), {'parent': self, 'params': params}) six.exec_(script, globals(), {'parent': self, 'params': params})
except RetryException as e: except RetryException as e:
@ -241,7 +249,7 @@ def done(data):
QtGui.QMessageBox.critical(None, 'Notice', six.text_type(data.data), QtGui.QMessageBox.Ok) QtGui.QMessageBox.critical(None, 'Notice', six.text_type(data.data), QtGui.QMessageBox.Ok)
sys.exit(0) sys.exit(0)
# Ask user to aprobe endpoint # Ask user to approve endpoint
def approveHost(host, parentWindow=None): def approveHost(host, parentWindow=None):
settings = QtCore.QSettings() settings = QtCore.QSettings()
settings.beginGroup('endpoints') settings.beginGroup('endpoints')
@ -258,6 +266,7 @@ def approveHost(host, parentWindow=None):
settings.endGroup() settings.endGroup()
return approved return approved
if __name__ == "__main__": if __name__ == "__main__":
logger.debug('Initializing connector') logger.debug('Initializing connector')
# Initialize app # Initialize app

View File

@ -1 +1 @@
RCYiCSIBFhbMgBl0/EIU+2P/zQIuoUlZCXb1gBt2oyy6tZ5DG2G6ZlT+ldPY/5rP0GoPM7BGqoBGVf2djT+isZ+5f3Gaq6YO8I5Bb9wVT6QkDJbXihZgK56H+zLwsDW032rPzPH8XXrTOrUS/TqktGquNTh46XUAlZ3lCBUZmEap+MNa3WYCqE2jfLLeYO0nYmrzTpst9mx2K2ZloqOH3oMdH7MnflmnCQLcMsDxOkBtZ5zr/NtgOW/JxS+0I4dDzJdcp9utye9cEA8jrMqNcEB3WN9NeGYXjT+5mVeRtiPn58hd4pO0MQb1FM06UKgwjQ3nU0p5yizzhCHdLjbKrd7REaUUbV3xnES0Q0SMTMSF51SsLb8yCN2sM6oQ4AJYvUL8E07ZhWyz+kv+xbdDN/3mC4lxUq1PzNaUUBnWReaH2ZEqfY6myEfn0C0gW/LEiLCD7PnG4lV2G9tCPWXvGGn601+ntQs2U6irbtJslSldd+1ZqcHyUmIAh9ChBr6Ro6hRz5Khl8WPq8ZyBMMapjdEEN+/gLa94AVhB/aCypmjTNcQzQsBlmHy0EyemoDb42kp8HRJl2jLdCUZxayZcV/KjrgLMuIEHQHDcaIa8UMzb6HK4U5KdHRNZK/E4SM276r8cmUl4zrlZ38kNkbsetQLcgKx3PGxjp9yGtUcioQ= WRPgBu2G+A8fer7tQRxlnwC6YY9xwuXqnVWEnZS0a2NPOcaoJ1JDNU9az9+oPJyc9Uy2D9ernavG9UbCDe16HF2Tzw1vfLKl4Mq1ySK/rV8GvZkVV6YpCOQG1ipLVApNm9CFUjYaMGQP1ROZ7LQkqviddjC28IyDOW1XOzDWh/2JKo+tn0Zp5dJzVXh0G0690vTA1ZIOQQwL1V8daQBDXHJ2XJpw3v0OYYmR01xCvVJ5B5H7DOx0mr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