From 1df8de683d35e2bb58e45cf76979643a4f5afe37 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 11 Aug 2011 23:06:01 -0400 Subject: [PATCH] Fixing notice error when all csrf tokens are expired at once. Fixes #1901 --- lib/Cake/Controller/Component/SecurityComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Controller/Component/SecurityComponent.php b/lib/Cake/Controller/Component/SecurityComponent.php index 5461de395..60fa92025 100644 --- a/lib/Cake/Controller/Component/SecurityComponent.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -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) {