From 07d99a5136b333bd22cb2dc1a3541097e67685d6 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 25 Mar 2013 23:03:34 +0100 Subject: [PATCH] FIX Fallback for Session.cookie_path Regression introduced by Config API static changes. Effectively meant that you can no longer log in to the CMS since the cookie path is set for each URL individually... --- control/Session.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/control/Session.php b/control/Session.php index eeaf0856e..27f3588d4 100644 --- a/control/Session.php +++ b/control/Session.php @@ -497,6 +497,7 @@ class Session { */ public static function start($sid = null) { $path = Config::inst()->get('Session', 'cookie_path'); + if(!$path) $path = Director::baseURL(); $domain = Config::inst()->get('Session', 'cookie_domain'); $secure = Config::inst()->get('Session', 'cookie_secure'); $session_path = Config::inst()->get('Session', 'session_store_path'); @@ -528,6 +529,7 @@ class Session { if(session_id()) { if($removeCookie) { $path = Config::inst()->get('cookie_path'); + if(!$path) $path = Director::baseURL(); $domain = Config::inst()->get('cookie_domain'); $secure = Config::inst()->get('cookie_secure');