From a0c610d988d4e1e144d5997256bccf0fb332703c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 24 Oct 2019 12:18:49 +0200 Subject: [PATCH] WS fixed audit origin address --- pandora_console/include/lib/WSManager.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora_console/include/lib/WSManager.php b/pandora_console/include/lib/WSManager.php index 143fd2366a..f1e4fc6524 100644 --- a/pandora_console/include/lib/WSManager.php +++ b/pandora_console/include/lib/WSManager.php @@ -277,6 +277,11 @@ class WSManager extends WebSocketServer $user->headers['cookie'] ); + // If being redirected from proxy. + if (isset($user->headers['x-forwarded-for']) === true) { + $user->address = $user->headers['x-forwarded-for']; + } + $user->account = new User(['phpsessionid' => $php_session_id]); $_SERVER['REMOTE_ADDR'] = $user->address;