mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
parent
fedf72b9c4
commit
981cb4bed5
@ -12,20 +12,12 @@ if (isset($_GET['?info_hash']) && !isset($_GET['info_hash']))
|
|||||||
$_GET['info_hash'] = $_GET['?info_hash'];
|
$_GET['info_hash'] = $_GET['?info_hash'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify info_hash
|
if (!isset($_GET['info_hash']) || strlen($_GET['info_hash']) != 20)
|
||||||
if (!isset($_GET['info_hash']))
|
|
||||||
{
|
{
|
||||||
msg_die('Invalid info_hash');
|
msg_die('Invalid info_hash: ' . bin2hex($_GET['info_hash']));
|
||||||
}
|
}
|
||||||
|
|
||||||
$info_hash = $_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)
|
function msg_die ($msg)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user