From 8c99b13e12052ce9055f92eb9a8c9dddc98ea01d Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Thu, 25 May 2017 12:01:11 +0300 Subject: [PATCH] Improve algorithm in setting the value for a visitor's IP --- src/mibew/libs/chat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mibew/libs/chat.php b/src/mibew/libs/chat.php index 781c509c..d893c536 100644 --- a/src/mibew/libs/chat.php +++ b/src/mibew/libs/chat.php @@ -580,7 +580,7 @@ function get_remote_host() $has_proxy = isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != $_SERVER['REMOTE_ADDR']; if ($has_proxy) { - $ips = explode(', ', $_SERVER['HTTP_X_FORWARDED_FOR'], 2); + $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'], 2); $ext_addr = (count($ips) > 1) ? $ips[0] . ' (' . $_SERVER['HTTP_X_FORWARDED_FOR'] . ')' : $ips[0];