fix issue 1236

fixes regression introduced in PR #1062 affecting default and minimum lengths of ackdata objects
This commit is contained in:
f97ada87 2018-05-05 12:38:05 +00:00 committed by GitHub
parent 4ea6f0208c
commit bcaad3e0fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -776,8 +776,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
if len(params) != 1: if len(params) != 1:
raise APIError(0, 'I need one parameter!') raise APIError(0, 'I need one parameter!')
ackdata, = params ackdata, = params
if len(ackdata) != 64: if len(ackdata) < 76:
raise APIError(15, 'The length of ackData should be 32 bytes (encoded in hex thus 64 characters).') raise APIError(15, 'The length of ackData should be at least 38 bytes (encoded in hex thus 76 characters).')
ackdata = self._decode(ackdata, "hex") ackdata = self._decode(ackdata, "hex")
queryreturn = sqlQuery( queryreturn = sqlQuery(
'''SELECT status FROM sent where ackdata=?''', '''SELECT status FROM sent where ackdata=?''',