Skip to content

Commit

Permalink
Fixing notice error when all csrf tokens are expired at once.
Browse files Browse the repository at this point in the history
Fixes #1901
  • Loading branch information
markstory committed Aug 12, 2011
1 parent 1726bad commit 1df8de6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/SecurityComponent.php
Expand Up @@ -511,7 +511,7 @@ protected function _generateToken($controller) {
$token['csrfTokens'] = $this->_expireTokens($tokenData['csrfTokens']);
}
}
if ($this->csrfCheck && ($this->csrfUseOnce || empty($tokenData['csrfTokens'])) ) {
if ($this->csrfCheck && ($this->csrfUseOnce || empty($token['csrfTokens'])) ) {
$token['csrfTokens'][$authKey] = strtotime($this->csrfExpires);
}
if ($this->csrfCheck && $this->csrfUseOnce == false) {
Expand Down

0 comments on commit 1df8de6

Please sign in to comment.