Code

Added session ID regeneration
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 Apr 2008 06:59:55 +0000 (06:59 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 Apr 2008 06:59:55 +0000 (06:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10572 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_session.inc

index 1127f6a2ba3974296b294014ec3b2c7e0daa9e5f..4773fe17d015983240f9e792225de4bac9cc2561 100644 (file)
@@ -73,6 +73,12 @@ class session {
                   the php.ini, so if you use debian, you must hardcode session.gc_maxlifetime in your php.ini */
                ini_set("session.gc_maxlifetime",24*60*60);
                session_start();
+
+    /* Regenerate ID to increase security */
+    if (!isset($_SESSION['started'])){
+      session_regenerate_id();
+      $_SESSION['started'] = true;
+    }
        }
 
        public static function destroy()