mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
aquatic_http: check info_hash and peer_id len when deserializing
This commit is contained in:
parent
5e7f8bea20
commit
c8de9857f8
3 changed files with 33 additions and 61 deletions
|
|
@ -184,6 +184,13 @@ pub fn run_handshake_and_read_requests<'a>(
|
|||
|
||||
debug!("read request, sending to handler");
|
||||
|
||||
if let Request::Announce(ref request) = request {
|
||||
for (i, c) in request.info_hash.0.chars().enumerate() {
|
||||
debug!("{}: {}", i, c.escape_unicode());
|
||||
}
|
||||
debug!("request info hash char count: {}", request.info_hash.0.chars().count());
|
||||
}
|
||||
|
||||
if let Err(err) = request_channel_sender
|
||||
.send((meta, request))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue