From 72643471829e0bca5cb7f2f9d9480dfd348d1d76 Mon Sep 17 00:00:00 2001 From: Jordan Hall Date: Wed, 19 Jun 2013 22:50:00 +0100 Subject: [PATCH] Added parameters check for getInboxMessageById and getSentMessageById API commands --- src/bitmessagemain.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index a0da58fa..fc7ce7fe 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -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()