Fix: codeigniter-reactor/199 CSRF config in Security class is no longer ignored
diff --git a/system/core/Security.php b/system/core/Security.php
index ceef977..73a3cfb 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -58,6 +58,15 @@
*/
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 @@
// END Security Class
/* End of file Security.php */
-/* Location: ./system/libraries/Security.php */
\ No newline at end of file
+/* Location: ./system/libraries/Security.php */