From b62438e8eac64bf517368ae95b992846227b2e27 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 14 Feb 2022 19:11:45 +0800 Subject: [PATCH] fix deny Bittorrent Protocol v2 torrents --- public/takeupload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/takeupload.php b/public/takeupload.php index 55c9dd89..5e883813 100644 --- a/public/takeupload.php +++ b/public/takeupload.php @@ -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