Browse files

Fixing notice error when all csrf tokens are expired at once.

Fixes #1901
  • Loading branch information...
1 parent 1726bad commit 1df8de683d35e2bb58e45cf76979643a4f5afe37 @markstory markstory committed Aug 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Controller/Component/SecurityComponent.php
View
2 lib/Cake/Controller/Component/SecurityComponent.php
@@ -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) {

0 comments on commit 1df8de6

Please sign in to comment.