Fix RFC 1918 RegExp (#210)

This commit is contained in:
Roman Kelesidis 2023-07-10 11:45:24 +07:00 committed by GitHub
parent 6693e7cc7b
commit 96828ca3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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';