From 383e73da8d4c09c8baac55145c76b65f6c1e9eaf Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 26 Nov 2023 14:10:43 +0700 Subject: [PATCH] Update functions_torrent.php --- library/includes/functions_torrent.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/includes/functions_torrent.php b/library/includes/functions_torrent.php index 890841f8..e91bc6bc 100644 --- a/library/includes/functions_torrent.php +++ b/library/includes/functions_torrent.php @@ -326,9 +326,13 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE // Exclude padding files [Only for hybrid torrents] if ((isset($f['attr']) ? $f['attr'] : null) !== 'p') { - $totallen += (float) $f['length']; + $totallen += (isset($f['length']) && is_numeric($f['length'])) ? (float) $f['length'] : 'invalid_size'; } } + if ($totallen === 'invalid_size') + { + torrent_error_exit($lang['TORFILE_INVALID']); + } } else {