summaryrefslogtreecommitdiffstats
path: root/system/core/Security.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-08-21 17:09:54 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-08-21 17:09:54 +0200
commit9f52b09abe8dd2919cf9b5d22d12abb0203eb8a8 (patch)
treefd94ba9616ccc4cfbdb3ecfddece0ce2fa1bba24 /system/core/Security.php
parentcaec47b75d132b98a1b251448a46d3756d05c7b8 (diff)
parentc09370bebb08082ab0655a964a6e6e1331ed47fb (diff)
Merge branch 'working'
Diffstat (limited to 'system/core/Security.php')
-rwxr-xr-xsystem/core/Security.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index ceef9779c..3617cadcc 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -58,8 +58,20 @@ class CI_Security {
*/
public function __construct()
{
- // Append application specific cookie prefix to token name
- $this->_csrf_cookie_name = (config_item('cookie_prefix')) ? config_item('cookie_prefix').$this->_csrf_token_name : $this->_csrf_token_name;
+ // CSRF config
+ foreach(array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key)
+ {
+ if (FALSE !== ($val = config_item($key)))
+ {
+ $this->{'_'.$key} = $val;
+ }
+ }
+
+ // Append application specific cookie prefix
+ if (config_item('cookie_prefix'))
+ {
+ $this->_csrf_cookie_name = config_item('cookie_prefix').$this->_csrf_cookie_name;
+ }
// Set the CSRF hash
$this->_csrf_set_hash();
@@ -817,4 +829,4 @@ class CI_Security {
// END Security Class
/* End of file Security.php */
-/* Location: ./system/libraries/Security.php */ \ No newline at end of file
+/* Location: ./system/libraries/Security.php */