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:
raise APIError(0, 'I need one parameter!')
ackdata, = params
if len(ackdata) != 64:
raise APIError(15, 'The length of ackData should be 32 bytes (encoded in hex thus 64 characters).')
if len(ackdata) < 76:
raise APIError(15, 'The length of ackData should be at least 38 bytes (encoded in hex thus 76 characters).')
ackdata = self._decode(ackdata, "hex")
queryreturn = sqlQuery(
'''SELECT status FROM sent where ackdata=?''',