clientfix

This commit is contained in:
Adolfo Gómez García 2019-04-23 14:07:43 +02:00
parent 31d2775f4d
commit b248a284bb

View File

@ -182,7 +182,7 @@ class UDSClient(QtGui.QMainWindow):
params = None params = None
if self.serverVersion <= OLD_METHOD_VERSION: if self.serverVersion <= OLD_METHOD_VERSION:
script = data['result'].decode('base64').decode('bz2_codec') script = data['result'].decode('base64').decode('bz2')
else: else:
res = data['result'] res = data['result']
# We have three elements on result: # We have three elements on result:
@ -190,7 +190,7 @@ class UDSClient(QtGui.QMainWindow):
# * Signature # * Signature
# * 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_codec'), res['signature'], json.loads(res['params'].decode('base64').decode('bz2_codec')) script, signature, params = res['script'].decode('base64').decode('bz2'), res['signature'], json.loads(res['params'].decode('base64').decode('bz2'))
if tools.verifySignature(script, signature) is False: if tools.verifySignature(script, signature) is False:
logger.error('Signature is invalid') logger.error('Signature is invalid')