From 7199b0e5da36ce50d6628af59da4643591ebaf5c Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 22 Apr 2018 20:59:44 -0500 Subject: [PATCH] now check base64 after bool check --- onionr/communicator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index 19948c06..cba930ef 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -239,12 +239,12 @@ class OnionrCommunicate: for i in peerList: hasher = hashlib.sha3_256() data = self.performGet('getData', i, hash) + if data == False or len(data) > 10000000: + continue try: base64.b64decode(data) except binascii.Error: data = b'' - if data == False or len(data) > 10000000: - continue hasher.update(data) digest = hasher.hexdigest() if type(digest) is bytes: