Added parameters check for getInboxMessageById and getSentMessageById API commands

This commit is contained in:
Jordan Hall 2013-06-19 22:50:00 +01:00
parent 28ed9676cc
commit 7264347182

View File

@ -3697,6 +3697,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
data += ']}'
return data
elif method == 'getInboxMessageById':
if len(params) == 0:
return 'API Error 0000: I need parameters!'
msgid = params[0].decode('hex')
v = (msgid,)
shared.sqlLock.acquire()
@ -3729,6 +3731,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
data += ']}'
return data
elif method == 'getSentMessageById':
if len(params) == 0:
return 'API Error 0000: I need parameters!'
msgid = params[0].decode('hex')
v = (msgid,)
shared.sqlLock.acquire()