From 902c6fa1734c6207af1767b6afb4abf0dd6bbeeb Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 20 Jun 2007 03:10:15 +0000 Subject: [PATCH] Adding fix for Ticket #2773, fixes Security Component requireAuth git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5306 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/components/security.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index 63f4e8838..23b79fc55 100644 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -356,14 +356,14 @@ class SecurityComponent extends Object { * @access private */ function __authRequired(&$controller) { - if(is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($controller->params)) { + if(is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($controller->data)) { if(in_array($controller->action, $this->requireAuth) || $this->requireAuth == array('*')) { - if(!isset($controller->params['_Token'] )) { + if(!isset($controller->data['__Token'] )) { if(!$this->blackHole($controller, 'auth')) { return null; } } - $token = $controller->params['_Token']['key']; + $token = $controller->data['__Token']['key']; if($this->Session->check('_Token')) { $tData = unserialize($this->Session->read('_Token'));