remove further private IPs from proxys (incl. space after comma)

This commit is contained in:
Ralf Becker 2019-04-22 23:44:51 +02:00
parent 14e75fe0dc
commit ec44ae3905

View File

@ -1254,7 +1254,7 @@ class Session
public static function getuser_ip()
{
return isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
preg_replace('/,10\..*$/', '', $_SERVER['HTTP_X_FORWARDED_FOR']) :
preg_replace('/, *10\..*$/', '', $_SERVER['HTTP_X_FORWARDED_FOR']) :
$_SERVER['REMOTE_ADDR'];
}