From 96828ca3d12d258b68bbd497403944bde173b9ae Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 10 Jul 2023 11:45:24 +0700 Subject: [PATCH] Fix RFC 1918 RegExp (#210) --- CHANGELOG.md | 8 ++++++++ bt/announce.php | 2 +- library/config.php | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fa21cd9..a24c82cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # 📖 Change Log +## [v2.1.5-2023.07](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.07) (2023-08-04) (В разработке) +[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.06...v2.1.5-2023.07) + +**Merged pull requests:** + +- Release v2.1.5-2023.07 🎉 +- Fix RFC 1918 RegExp [\#210](https://github.com/torrentpier/torrentpier-lts/pull/210) ([belomaxorka](https://github.com/belomaxorka)) + ## [v2.1.5-2023.06](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.06) (2023-07-04) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.05...v2.1.5-2023.06) diff --git a/bt/announce.php b/bt/announce.php index 6268d47d..d9dd4e92 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -118,7 +118,7 @@ if (!$bb_cfg['ignore_reported_ip'] && isset($_GET['ip']) && $ip !== $_GET['ip']) { if ($x_ip === $_GET['ip']) { - if (!$bb_cfg['allow_internal_ip'] && preg_match("#^(10|172\.16|192\.168)\.#", $x_ip)) + if (!$bb_cfg['allow_internal_ip'] && preg_match("#(127\.([0-9]{1,3}\.){2}[0-9]{1,3}|10\.([0-9]{1,3}\.){2}[0-9]{1,3}|172\.[123][0-9]\.[0-9]{1,3}\.[0-9]{1,3}|192\.168\.[0-9]{1,3}\.[0-9]{1,3})#", $x_ip)) { break; } diff --git a/library/config.php b/library/config.php index e9382883..f342a5c9 100644 --- a/library/config.php +++ b/library/config.php @@ -77,8 +77,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do $domain_ssl = false; // Version info -$bb_cfg['tp_version'] = '2.1.5-2023.06'; -$bb_cfg['tp_release_date'] = '04-07-2023'; +$bb_cfg['tp_version'] = '2.1.5-2023.07'; +$bb_cfg['tp_release_date'] = '04-08-2023'; $bb_cfg['tp_release_state'] = 'LTS'; $bb_cfg['tp_zf_version'] = '2.4.13';