Reject objects that are not in stream 1

This commit is contained in:
TheKysek 2017-05-25 11:37:02 +02:00
parent 5d73474358
commit 1b5d2090e1
No known key found for this signature in database
GPG Key ID: 50D9AF00D0B1C497

View File

@ -84,6 +84,8 @@ class Object(object):
return False return False
if len(self.object_payload) > 2**18: if len(self.object_payload) > 2**18:
return False return False
if self.stream_number != 1:
return False
data = self.to_bytes()[8:] data = self.to_bytes()[8:]
length = len(data) + 8 + shared.payload_length_extra_bytes length = len(data) + 8 + shared.payload_length_extra_bytes
dt = max(self.expires_time - time.time(), 0) dt = max(self.expires_time - time.time(), 0)