[eluser]ExWizzard[/eluser]
So i enabled csrf and i extended the csrf_show_error() function and removed the show_error() part so when the cookie expires, the form will just be submitted again and a new cookie will be generated instead of showing the error, everything works great but i get that notice in the log and im wondering if there is something wrong or just harmless notice, i did rename the cookie in the config to csrf_u_cookie
Code:
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Security extends CI_Security {
public function __construct()
{
parent::__construct();
}
public function csrf_show_error()
{
//show_error('The action you have requested is not allowed.' );
log_message('info', 'CSRF expired');
}
}
?>
Code:
INFO - 2012-04-29 15:55:55 --> CSRF expired
ERROR - 2012-04-29 15:55:55 --> Severity: Notice --> Undefined index: csrf_u_cookie /system/core/Security.php 147
INFO - 2012-04-29 15:55:55 --> CSRF expired
DEBUG - 2012-04-29 15:55:55 --> CRSF cookie Set
DEBUG - 2012-04-29 15:55:55 --> CSRF token verified