From 036250f11ae22e490c855a56a6313701f0b7b6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Fri, 6 Sep 2024 17:36:59 +0200 Subject: [PATCH] MAG2-318 - Fixed client ip getter --- Helper/Environment.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Helper/Environment.php b/Helper/Environment.php index 10b559ae..e0ba70f9 100644 --- a/Helper/Environment.php +++ b/Helper/Environment.php @@ -74,7 +74,9 @@ public function getEncoding() public function getRemoteIp() { $blProxyMode = (bool)$this->getConfigParam('proxy_mode', 'processing', 'payone_misc'); - return $this->request->getClientIp($blProxyMode); + $sClientIp = $this->request->getClientIp($blProxyMode); // may return a comma separated ip list like ", , " + $aSplitIp = explode(",", $sClientIp); // split by comma + return trim(current($aSplitIp)); // return first array element } /**