This commit is contained in:
Cønstantine Kovalensky 2023-11-18 20:55:37 +04:00 committed by GitHub
commit 20662f16e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2066,6 +2066,8 @@ function hash_search($hash)
bb_die(sprintf($lang['HASH_INVALID'], $hash));
}
$info_hash = DB()->escape(pack('H*', $hash));
// Check info_hash version
if (mb_strlen($hash, 'UTF-8') == 40) {
$info_hash_where = "WHERE info_hash = '$info_hash'";
@ -2075,8 +2077,6 @@ function hash_search($hash)
bb_die(sprintf($lang['HASH_INVALID'], $hash));
}
$info_hash = DB()->escape(pack('H*', $hash));
if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where")) {
redirect(TOPIC_URL . $row['topic_id']);
} else {