Minor improvements (#867)

This commit is contained in:
Roman Kelesidis 2023-08-27 19:00:48 +07:00 committed by GitHub
commit 87b497e32a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -64,7 +64,7 @@ $passkey = ${$passkey_key} ?? null;
// Verify request
// Required params (info_hash, peer_id, port, uploaded, downloaded, left, passkey)
if (!isset($info_hash)) {
msg_die('info_hash does not exists');
msg_die('info_hash does not exist');
}
if (!isset($peer_id) || strlen($peer_id) != 20) {
msg_die('Invalid peer_id');

View file

@ -25,8 +25,9 @@ if (isset($_GET['?info_hash']) && !isset($_GET['info_hash'])) {
$is_bt_v2 = null;
$info_hash = isset($_GET['info_hash']) ? (string)$_GET['info_hash'] : null;
// Verify info_hash
if (!isset($info_hash)) {
msg_die('info_hash does not exists');
msg_die('info_hash does not exist');
}
// Check info_hash version