sanitize timestamp and expiration in requests

This commit is contained in:
ThomasV 2015-07-22 15:24:15 +02:00
parent 37c07278d5
commit b813ba0bdd
1 changed files with 4 additions and 0 deletions

View File

@ -292,6 +292,10 @@ def make_unsigned_request(req):
addr = req['address']
time = req.get('time', 0)
expires = req.get('exp', 0)
if type(time) != int:
time = 0
if type(exp) != int:
exp = 0
amount = req['amount']
if amount is None:
amount = 0