Add referrer "origin" policy to repository links (#1357)

This commit is contained in:
Cønstantine Kovalensky 2024-01-28 10:46:06 +04:00 committed by GitHub
commit 827ce7998d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -53,8 +53,8 @@ if (!is_file($file_path)) {
$file_contents = file_get_contents($file_path);
if ($bb_cfg['flist_max_files']) {
$filetree_pos = !empty($row['info_hash_v2']) ? strpos($file_contents, '9:file tree') : false;
$files_pos = !empty($row['info_hash']) ? strpos($file_contents, '5:files', $filetree_pos) : false;
$filetree_pos = $meta_v2 ? strpos($file_contents, '9:file tree') : false;
$files_pos = $meta_v1 ? strpos($file_contents, '5:files', $filetree_pos) : false;
if ($filetree_pos) {
$file_count = substr_count($file_contents, '6:length', $filetree_pos, ($files_pos ? ($files_pos - $filetree_pos) : null));
@ -201,14 +201,14 @@ sup {
<sup>?
<span class="tooltiptext">
BitTorrent Merkle Root is a hash of a file embedded in torrents with BitTorrent v2 support, tracker users can extract, calculate them, and download deduplicated torrents using desktop tools such as
<a href="https://github.com/kovalensky/tmrr" target="_blank">Torrent Merkle Root Reader.</a>
<a href="https://github.com/kovalensky/tmrr" target="_blank" referrerpolicy="origin">Torrent Merkle Root Reader.</a>
</span>
</sup>
</th>
</tr>
{$allFiles}
</table>
<p style = "color: gray; font-family: Calibri Light">Generated by <a href = "https://github.com/torrentpier/torrentpier" target="_blank" title = "Bull-powered BitTorrent tracker engine">TorrentPier</a></p>
<p style = "color: gray; font-family: Calibri Light">Generated by <a href = "https://github.com/torrentpier/torrentpier" target="_blank" referrerpolicy="origin" title = "Bull-powered BitTorrent tracker engine">TorrentPier</a></p>
</center>
</body>
</html>

View file

@ -16,7 +16,7 @@ global $bb_cfg, $userdata, $template, $DBS, $lang;
if (!empty($template)) {
$template->assign_vars([
'SIMPLE_FOOTER' => !empty($gen_simple_header),
'POWERED' => 'Fueled by <a target="_blank" href="https://github.com/torrentpier/torrentpier">TorrentPier</a> &copy; 2005-' . date('Y'),
'POWERED' => 'Fueled by <a target="_blank" referrerpolicy="origin" href="https://github.com/torrentpier/torrentpier">TorrentPier</a> &copy; 2005-' . date('Y'),
'SHOW_ADMIN_LINK' => (IS_ADMIN && !defined('IN_ADMIN')),
'ADMIN_LINK_HREF' => 'admin/index.php',
]);