Upgrade to CodeIgniter 2.0.3

This commit is contained in:
Eike Foken
2011-09-13 19:15:50 +02:00
parent 8dd1099e04
commit a8c2551be2
53 changed files with 1949 additions and 578 deletions

View File

@@ -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 */
/* Location: ./system/libraries/Security.php */