diff --git a/library/includes/file_list_v2.php b/library/includes/file_list_v2.php index 520ac545d..c7a930c3f 100644 --- a/library/includes/file_list_v2.php +++ b/library/includes/file_list_v2.php @@ -35,23 +35,26 @@ if (empty($row) || empty($row['physical_filename'])) { } if (empty($row['info_hash_v2'])) { - http_response_code(404); + http_response_code(410); die($lang['BT_V2_FILE_LIST_ONLY']); } $file_path = get_attachments_dir() . '/' . $row['physical_filename']; if (!is_file($file_path)) { + http_response_code(410); die($lang['TOR_NOT_FOUND']); } $file_contents = file_get_contents($file_path); if (!$tor = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY)) { + http_response_code(410); die($lang['TORFILE_INVALID']); } if (isset($tor['info']['private']) && IS_GUEST) { + http_response_code(403); die($lang['BT_PRIVATE_TORRENT']); } @@ -68,6 +71,7 @@ $data = [ ]; echo << @@ -77,52 +81,99 @@ echo <<{$data['name']} ({$data['size']}) | {$data['hash']} | {$bb_cfg['sitename']} - +
-

Name: {$data['name']} | Age: ({$data['date']}) | Size: {$data['size']} -

-

Created by: {$data['client']}

+

Name: {$data['name']} | Age: ({$data['date']}) | Size: {$data['size']}

+

+ Created by: {$data['client']} +


- - +
PathSizeBTMR hash ?
+ + + + + EOF; echo $files['list']; -echo ' +echo '
PathSize + BTMR hash + ? + + BitTorrent Merkle Root is a hash of a file that is embedded in torrents with BitTorrent v2 support, tracker users can extract, calculate them, and download deduplicated torrents using desktop tools such as + Torrent Merkle Root Reader. + + +
-

Generated by TorrentPier

+

+ Generated by TorrentPier +

+
';