• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting $cookieSecure = true;

#1
When I set $cookieSecure = true; in Config/App.php and submit a form I get the following error:

BASEPATH/Security/Security.php at line 193
PHP Code:
186         }
187 
188         
// Do the tokens exist in both the _POST and _COOKIE arrays?
189         if ( ! isset($_POST[$this->CSRFTokenName], $_COOKIE[$this->CSRFCookieName])
190              || $_POST[$this->CSRFTokenName] !== $_COOKIE[$this->CSRFCookieName]
191         // Do the tokens match?
192         {
193             throw new \LogicException('The action you requested is not allowed'403);
194         }
195 
196         
// We kill this since we're done and we don't want to pollute the _POST array
197         unset($_POST[$this->CSRFTokenName]);
198 
199         
// Regenerate on every submission?
200         if ($this->CSRFRegenerate

My form uses the csrf function to create a token. Why is that a problem?
Simpler is always better
Reply


Messages In This Thread
Setting $cookieSecure = true; - by donpwinston - 02-20-2019, 11:08 AM
RE: Setting $cookieSecure = true; - by puschie - 02-22-2019, 03:14 AM
RE: Setting $cookieSecure = true; - by puschie - 02-25-2019, 07:27 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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