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

Fixes #1901
This commit is contained in:
mark_story 2011-08-11 23:06:01 -04:00
parent 1726bad396
commit 1df8de683d

View file

@ -511,7 +511,7 @@ class SecurityComponent extends Component {
$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) {