• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.