fix deny Bittorrent Protocol v2 torrents

This commit is contained in:
xiaomlove
2022-02-14 19:11:45 +08:00
parent a33f3308d4
commit b62438e8ea

View File

@@ -117,7 +117,7 @@ function checkTorrentDict($dict, $key, $type = null)
}
$info = checkTorrentDict($dict, 'info');
if (isset($info['piece layers']) || isset($info['files tree']) || (isset($info['meta version']) && $info['meta version'] == 2)) {
if (isset($dict['piece layers']) || isset($info['files tree']) || (isset($info['meta version']) && $info['meta version'] == 2)) {
bark('Torrent files created with Bittorrent Protocol v2, or hybrid torrents are not supported.');
}
$plen = checkTorrentDict($info, 'piece length', 'integer'); // Only Check without use