Timeline — 2.4.1 (#1340)

This commit is contained in:
Cønstantine Kovalensky 2024-01-26 23:19:25 +04:00 committed by GitHub
commit 306994f629
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
295 changed files with 130 additions and 101 deletions

View file

@ -44,7 +44,7 @@ date_default_timezone_set('UTC');
// Set remote address
$allowedCDNs = ['HTTP_X_FORWARDED_FOR', 'HTTP_FASTLY_CLIENT_IP', 'HTTP_CF_CONNECTING_IP'];
foreach ($allowedCDNs as $allowedCDN) {
if (isset($_SERVER[$allowedCDN]) && filter_var($_SERVER[$allowedCDN], FILTER_VALIDATE_IP)) {
if (isset($_SERVER[$allowedCDN]) && filter_var($_SERVER[$allowedCDN], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
$_SERVER['REMOTE_ADDR'] = $_SERVER[$allowedCDN];
}
}