Welcome Guest, Not a member yet? Register   Sign In
csrf error 500 with cookies disabled in browser
#1

Hi,
When cookies are disabled in browser, doing a controller post with csrf return a 500 error, which seems to be logical. But i can't find where and when in the flow i can catch that cookies are disabled. Putting log debug in front off controller indicates that nothing entered in controller.

Using CI 2.26.

Sorry for bad english i'm french  Big Grin
Reply
#2

found a dirty (?) solution, putting this in config.php instead of in a hook :


PHP Code:
if(!empty($_POST)) {
   if(!isset(
$_COOKIE[$config['sess_cookie_name']])) {
   
// REDIRECT TODO
   
}

Reply




Theme © iAndrew 2016 - Forum software by © MyBB