Welcome Guest, Not a member yet? Register   Sign In
csrf cookie notice
#1

[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


Messages In This Thread
csrf cookie notice - by El Forum - 04-29-2012, 07:04 AM
csrf cookie notice - by El Forum - 05-03-2012, 04:55 AM
csrf cookie notice - by El Forum - 05-03-2012, 07:14 AM
csrf cookie notice - by El Forum - 05-03-2012, 10:25 AM
csrf cookie notice - by El Forum - 05-03-2012, 10:40 AM
csrf cookie notice - by El Forum - 05-03-2012, 11:10 AM
csrf cookie notice - by El Forum - 05-03-2012, 12:13 PM
csrf cookie notice - by El Forum - 05-04-2012, 04:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB