summaryrefslogtreecommitdiffstats
path: root/system/core/Security.php
diff options
context:
space:
mode:
authorpatwork <patwork@gmail.com>2011-04-09 13:04:06 +0200
committerpatwork <patwork@gmail.com>2011-04-09 13:04:06 +0200
commitef1a55ad2875af3b2286a5b6eb9b65e997949f4d (patch)
tree72be9f9502f59f17ee456c2d7e97199344b7aa45 /system/core/Security.php
parent02404a1f59e4f3ae8231d87d8be5b23488ea86d2 (diff)
Fix: codeigniter-reactor/199 CSRF config in Security class is no longer ignored
Diffstat (limited to 'system/core/Security.php')
-rw-r--r--system/core/Security.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index ceef9779c..73a3cfb31 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -58,6 +58,15 @@ class CI_Security {
*/
public function __construct()
{
+ // 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 to token name
$this->_csrf_cookie_name = (config_item('cookie_prefix')) ? config_item('cookie_prefix').$this->_csrf_token_name : $this->_csrf_token_name;
@@ -817,4 +826,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 */