Merge branch '1882-Reinicio-de-las-sesiones-de-Pandora-a-través-de-un-F5-AON' into 'develop'

Filter config_prepare_session when use F5 balancer - #1882

See merge request artica/pandorafms!1276
This commit is contained in:
vgilc 2018-02-06 17:16:15 +01:00
commit 23be1a9921
1 changed files with 12 additions and 1 deletions

View File

@ -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'));