From 240c597c7d21684a2db5b105f56aebddfdfccd57 Mon Sep 17 00:00:00 2001
From: root <root@postoffice.intern>
Date: Tue, 22 Aug 2023 16:06:10 +0200
Subject: [PATCH 07/13] html/main.php: Fix bug where $config is a string after
 a while of AFK. GOsa would show PHP crashing.

Can be amended to existing patch!
---
 html/main.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html/main.php b/html/main.php
index e46acda..c2b8cf0 100644
--- a/html/main.php
+++ b/html/main.php
@@ -76,7 +76,7 @@ $ui= session::global_get('ui');
 // }
 
 $config = session::global_get('config');
-if (!isset($config)) {
+if (!isset($config) || !is_object($config)) {
   #die("Could not get config object. Please contact your system administrator or try again later.\n");
   new log("security","login","",array(),"main.php called with empty config object. Logging user out.") ;
   header ("Location: logout.php");
-- 
2.39.2

