more sanitization
This commit is contained in:
@@ -292,9 +292,9 @@ def make_unsigned_request(req):
|
|||||||
addr = req['address']
|
addr = req['address']
|
||||||
time = req.get('time', 0)
|
time = req.get('time', 0)
|
||||||
expires = req.get('exp', 0)
|
expires = req.get('exp', 0)
|
||||||
if type(time) != int:
|
if time and type(time) != int:
|
||||||
time = 0
|
time = 0
|
||||||
if type(exp) != int:
|
if exp and type(exp) != int:
|
||||||
exp = 0
|
exp = 0
|
||||||
amount = req['amount']
|
amount = req['amount']
|
||||||
if amount is None:
|
if amount is None:
|
||||||
|
|||||||
@@ -1245,7 +1245,11 @@ class Abstract_Wallet(object):
|
|||||||
address = r['address']
|
address = r['address']
|
||||||
amount = r.get('amount')
|
amount = r.get('amount')
|
||||||
timestamp = r.get('time', 0)
|
timestamp = r.get('time', 0)
|
||||||
|
if timestamp and type(timestamp) != int:
|
||||||
|
timestamp = 0
|
||||||
expiration = r.get('exp')
|
expiration = r.get('exp')
|
||||||
|
if expiration and type(expiration) != int:
|
||||||
|
expiration = 0
|
||||||
if amount:
|
if amount:
|
||||||
if self.up_to_date:
|
if self.up_to_date:
|
||||||
paid = amount <= self.get_addr_received(address)
|
paid = amount <= self.get_addr_received(address)
|
||||||
|
|||||||
Reference in New Issue
Block a user