From 981cb4bed5ed59fa2c764e950a79c09c9a62a4d1 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 30 Dec 2023 00:52:31 +0700 Subject: [PATCH] Revert "Update scrape.php" This reverts commit fedf72b9c485f082509068a73f3908b6136173a6. --- bt/scrape.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bt/scrape.php b/bt/scrape.php index 93651afb..2f678f12 100644 --- a/bt/scrape.php +++ b/bt/scrape.php @@ -12,20 +12,12 @@ if (isset($_GET['?info_hash']) && !isset($_GET['info_hash'])) $_GET['info_hash'] = $_GET['?info_hash']; } -// Verify info_hash -if (!isset($_GET['info_hash'])) +if (!isset($_GET['info_hash']) || strlen($_GET['info_hash']) != 20) { - msg_die('Invalid info_hash'); + msg_die('Invalid info_hash: ' . bin2hex($_GET['info_hash'])); } $info_hash = $_GET['info_hash']; -$info_hash_hex = bin2hex($info_hash); - -// Check info_hash length -if (strlen($info_hash) != 20) -{ - msg_die('Invalid info_hash: ' . (mb_check_encoding($info_hash, 'UTF8') ? $info_hash : $info_hash_hex)); -} function msg_die ($msg) {