summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/drivers/Session_native.php
diff options
context:
space:
mode:
authorGDmac <grdalenoort@gmail.com>2012-10-16 19:22:12 +0200
committerGDmac <grdalenoort@gmail.com>2012-10-16 19:22:12 +0200
commitff5ffdf7fa3b458510a95788ac3baa6fba3178cc (patch)
treea5c7de227be1d25a0fe080d72de303ba4d9f0d20 /system/libraries/Session/drivers/Session_native.php
parent28616da32bcf72f37c0e61e304a1799b90ceec3f (diff)
session native, fix cookie settings
Signed-off-by: GDmac <grdalenoort@gmail.com>
Diffstat (limited to 'system/libraries/Session/drivers/Session_native.php')
-rwxr-xr-xsystem/libraries/Session/drivers/Session_native.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/system/libraries/Session/drivers/Session_native.php b/system/libraries/Session/drivers/Session_native.php
index fb3b638a0..da744f39b 100755
--- a/system/libraries/Session/drivers/Session_native.php
+++ b/system/libraries/Session/drivers/Session_native.php
@@ -84,8 +84,8 @@ class CI_Session_native extends CI_Session_driver {
$expire = 7200;
$path = '/';
$domain = '';
- $secure = FALSE;
- $http_only = FALSE;
+ $secure = (bool) $config['cookie_secure'];
+ $http_only = (bool) $config['cookie_httponly'];
if ($config['sess_expiration'] !== FALSE)
{
@@ -105,18 +105,6 @@ class CI_Session_native extends CI_Session_driver {
$domain = $config['cookie_domain'];
}
- if ($config['cookie_secure'])
- {
- // Send over SSL / HTTPS only?
- $secure = $config['cookie_secure'];
- }
-
- if ($config['cookie_httponly'])
- {
- // only available to HTTP(S)?
- $http_only = $config['http_only'];
- }
-
session_set_cookie_params($config['sess_expire_on_close'] ? 0 : $expire, $path, $domain, $secure, $http_only);
// Start session