From 4953674077adb1f98acf81cdefb3c43a5e8dc919 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sun, 6 Jun 2021 00:51:48 +0800 Subject: [PATCH] improve announce log, add $_GET --- public/announce.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/announce.php b/public/announce.php index 366818a4..c27b5bcb 100644 --- a/public/announce.php +++ b/public/announce.php @@ -85,7 +85,8 @@ if (!$az = $Cache->get_value('user_passkey_'.$passkey.'_content')){ } if (!$az) err("Invalid passkey! Re-download the .torrent from $BASEURL"); $userid = intval($az['id'] ?? 0); -$GLOBALS["CURUSER"] = $currentUser; +unset($GLOBALS['CURUSER']); +$CURUSER = $GLOBALS["CURUSER"] = $currentUser; //3. CHECK IF CLIENT IS ALLOWED $clicheck_res = check_client($peer_id,$agent,$client_familyid); @@ -110,7 +111,7 @@ if (!$torrent = $Cache->get_value('torrent_hash_'.$info_hash.'_content')){ $Cache->cache_value('torrent_hash_'.$info_hash.'_content', $torrent, 350); } if (!$torrent) { - do_log("[TORRENT NOT EXISTS] $checkTorrentSql"); + do_log("[TORRENT NOT EXISTS] $checkTorrentSql, params: " . json_encode($_GET)); err("torrent not registered with this tracker"); } elseif ($torrent['banned'] == 'yes' && $az['class'] < $seebanned_class) err("torrent banned");