mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Fixed missing check on malformed advertisement packets
This commit is contained in:
parent
8fa6ec144c
commit
038c696db9
@ -835,6 +835,7 @@ class Link:
|
||||
for pending_request in self.pending_requests:
|
||||
if pending_request.request_id == request_id:
|
||||
response_resource = RNS.Resource.accept(packet, callback=self.response_resource_concluded, progress_callback=pending_request.response_resource_progress, request_id = request_id)
|
||||
if response_resource != None:
|
||||
pending_request.response_size = RNS.ResourceAdvertisement.read_size(packet)
|
||||
pending_request.response_transfer_size = RNS.ResourceAdvertisement.read_transfer_size(packet)
|
||||
pending_request.started_at = time.time()
|
||||
@ -1173,6 +1174,7 @@ class RequestReceipt():
|
||||
|
||||
|
||||
def response_resource_progress(self, resource):
|
||||
if resource != None:
|
||||
if not self.status == RequestReceipt.FAILED:
|
||||
self.status = RequestReceipt.RECEIVING
|
||||
if self.packet_receipt != None:
|
||||
|
Loading…
Reference in New Issue
Block a user