From 983bf15041fafa7ef8cffc37d696f78ba2c8ed70 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 22 Apr 2019 23:44:51 +0200 Subject: [PATCH] remove further private IPs from proxys (incl. space after comma) --- api/src/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Session.php b/api/src/Session.php index 7ea9884c61..64d0384692 100644 --- a/api/src/Session.php +++ b/api/src/Session.php @@ -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']; }