diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php index a22a242437a18..961dfb59ec962 100644 --- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php +++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php @@ -63,6 +63,11 @@ public function getRemoteAddress($ipToLong = false) if (!$this->remoteAddress) { return false; } + + if (strpos($this->remoteAddress, ',') !== false) { + $ipList = explode(',', $this->remoteAddress); + $this->remoteAddress = trim(reset($ipList)); + } return $ipToLong ? ip2long($this->remoteAddress) : $this->remoteAddress; }