From c3349266b58f77638ed4b4a887b2d29137760a57 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 23 Sep 2013 15:09:24 +0000 Subject: [PATCH] Fix 1.6-* upgrade to 1.7.1 8e72e521d48ca04fd8db7d05318e2c55b9b2d278 (v1.7.1.2+) introduced a bug where osTicket version 1.6 would not send a cookie (by calling PHP session_start()) for the login page. Therefore, after unpacking the 1.7.1 source code, an upgrade would not be possible, because a login would never be processed correctly. --- include/class.ostsession.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/class.ostsession.php b/include/class.ostsession.php index fb840d2f8..78b118299 100644 --- a/include/class.ostsession.php +++ b/include/class.ostsession.php @@ -25,7 +25,12 @@ class osTicketSession { if(!$this->ttl) $this->ttl=SESSION_TTL; - if (defined('DISABLE_SESSION') || OsticketConfig::getDBVersion()) + session_name('OSTSESSID'); + + if (OsticketConfig::getDBVersion()) + return session_start(); + + elseif (defined('DISABLE_SESSION')) return; # Cookies @@ -54,7 +59,6 @@ class osTicketSession { register_shutdown_function('session_write_close'); //Start the session. - session_name('OSTSESSID'); session_start(); } -- GitLab