mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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
This commit is contained in:
parent
32c092ecff
commit
902c6fa173
1 changed files with 3 additions and 3 deletions
|
@ -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'));
|
||||
|
|
Loading…
Add table
Reference in a new issue