|
|
@ -687,6 +687,7 @@ class rcube_utils
|
|
|
|
if (in_array($_SERVER['REMOTE_ADDR'], $proxy_whitelist)) {
|
|
|
|
if (in_array($_SERVER['REMOTE_ADDR'], $proxy_whitelist)) {
|
|
|
|
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
|
|
|
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
|
|
|
foreach (array_reverse(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])) as $forwarded_ip) {
|
|
|
|
foreach (array_reverse(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])) as $forwarded_ip) {
|
|
|
|
|
|
|
|
$forwarded_ip = trim($forwarded_ip);
|
|
|
|
if (!in_array($forwarded_ip, $proxy_whitelist)) {
|
|
|
|
if (!in_array($forwarded_ip, $proxy_whitelist)) {
|
|
|
|
return $forwarded_ip;
|
|
|
|
return $forwarded_ip;
|
|
|
|
}
|
|
|
|
}
|
|
|
|