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 4622c28bb2
commit 983bf15041

View File

@ -1268,7 +1268,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'];
}