diff options
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index ec6b2e98df0..de2e7a36eee 100644 --- a/lib/base.php +++ b/lib/base.php @@ -80,8 +80,6 @@ class OC{ date_default_timezone_set('Europe/Berlin'); ini_set('arg_separator.output','&'); - ini_set('session.cookie_httponly','1;'); - session_start(); // calculate the documentroot OC::$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']); @@ -102,6 +100,7 @@ class OC{ // redirect to https site if configured if( OC_Config::getValue( "forcessl", false )){ + ini_set("session.cookie_secure", "on"); if(!isset($_SERVER['HTTPS']) or $_SERVER['HTTPS'] != 'on') { $url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; header("Location: $url"); @@ -109,6 +108,9 @@ class OC{ } } + ini_set('session.cookie_httponly','1;'); + session_start(); + // Add the stuff we need always OC_Util::addScript( "jquery-1.6.4.min" ); OC_Util::addScript( "jquery-ui-1.8.14.custom.min" ); |