From 16f5b047d651572ac92ee7d22899e8d385bc4de3 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 6 Feb 2018 17:10:59 +0100 Subject: [PATCH] Filter config_prepare_session when use F5 balancer - #1882 --- pandora_console/index.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index e2c7f8c059..ed9eb48f9d 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -475,7 +475,18 @@ if (! isset ($config['id_user'])) { db_logon ($nick_in_db, $_SERVER['REMOTE_ADDR']); $_SESSION['id_usuario'] = $nick_in_db; $config['id_user'] = $nick_in_db; - config_prepare_session(); + + // Check if connection goes through F5 balancer. If it does, then don't call config_prepare_session() or user will be back to login all the time + $prepare_session = true; + foreach ($_COOKIE as $key=>$value) { + if (preg_match('/BIGipServer*/',$key) ) { + $prepare_session = false; + } + } + if ($prepare_session){ + config_prepare_session(); + } + if (is_user_admin($config['id_user'])) { // PHP configuration values $PHPupload_max_filesize = config_return_in_bytes(ini_get('upload_max_filesize'));