From 87cf935d357689b3dcb0bab5566a6f203fe888fb Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Wed, 4 Oct 2023 23:28:05 +0700 Subject: [PATCH] Update announce.php --- bt/announce.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bt/announce.php b/bt/announce.php index 30e0d3b7..6c3d66c0 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -78,11 +78,7 @@ if (strlen($info_hash) != 20) { msg_die('Invalid info_hash: ' . bin2hex($info_hash)); } -if (!isset($peer_id)) -{ - msg_die('peer_id was not provided'); -} -if (strlen($peer_id) != 20) +if (!isset($peer_id) || strlen($peer_id) != 20) { msg_die('Invalid peer_id: ' . bin2hex($peer_id)); }