Update announce.php

This commit is contained in:
Roman Kelesidis 2023-10-04 23:28:05 +07:00
parent 933e4b3283
commit 87cf935d35

View File

@ -78,11 +78,7 @@ if (strlen($info_hash) != 20)
{ {
msg_die('Invalid info_hash: ' . bin2hex($info_hash)); msg_die('Invalid info_hash: ' . bin2hex($info_hash));
} }
if (!isset($peer_id)) if (!isset($peer_id) || strlen($peer_id) != 20)
{
msg_die('peer_id was not provided');
}
if (strlen($peer_id) != 20)
{ {
msg_die('Invalid peer_id: ' . bin2hex($peer_id)); msg_die('Invalid peer_id: ' . bin2hex($peer_id));
} }