diff options
author | Robin Sowell <robin.sowell@ellislab.com> | 2011-02-11 21:31:27 +0100 |
---|---|---|
committer | Robin Sowell <robin.sowell@ellislab.com> | 2011-02-11 21:31:27 +0100 |
commit | d6d9f454b6939d1e6f1c9687f4e08d89690f79ff (patch) | |
tree | 2fdd83293d5bf27308475b44e7d36c652175b1e0 /system/core | |
parent | a3e6224d8eeddce7b86c8fe122e84c91a570d882 (diff) |
Adding config option to require 'secure' setting for all cookies- requires https.
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Input.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/system/core/Input.php b/system/core/Input.php index 1157601e1..c2db94d64 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -225,8 +225,10 @@ class CI_Input { $expire = 0; } } + + $secure_cookie = (config_item('cookie_secure') === TRUE) ? 1 : 0; - setcookie($prefix.$name, $value, $expire, $path, $domain, 0); + setcookie($prefix.$name, $value, $expire, $path, $domain, $secure_cookie); } // -------------------------------------------------------------------- |