From 3ed6780ac4b75939f87abc8f464232fe52528431 Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 6 Jun 2007 17:28:32 +0000 Subject: [PATCH] Adding fix for #2648, fixes issue with token not being regenerated git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5251 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/components/security.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index 4ea0a456a..a42abbb12 100644 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -145,10 +145,11 @@ class SecurityComponent extends Object { $this->__secureRequired($controller); $this->__authRequired($controller); $this->__loginRequired($controller); - if($this->RequestHandler->isPost()) { + + if((!isset($controller->params['requested']) || $controller->params['requested'] != 1) && $this->RequestHandler->isPost()) { $this->__validatePost($controller); - return; } + $this->__generateToken($controller); } /**