1. Arictos
  2. CodeIgniter Reactor

Commits

patwork  committed 5ffcfc6

Fix: codeigniter-reactor/199 CSRF config in Security class is no longer ignored

  • Participants
  • Parent commits a9db2ad
  • Branches default

Comments (0)

Files changed (1)

File system/core/Security.php

View file
 	 */
 	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;
 
 // END Security Class
 
 /* End of file Security.php */
-/* Location: ./system/libraries/Security.php */
+/* Location: ./system/libraries/Security.php */