From 79cab67be7be0cf98638b41d684311b026936b9e Mon Sep 17 00:00:00 2001 From: Thomas Ploch Date: Mon, 5 Mar 2012 11:06:42 +0100 Subject: [PATCH] Adding missing 'recursive' option to DigestAuthenticate object. Used integer casting in _findUser() method for 'recursive' option. --- lib/Cake/Controller/Component/Auth/BaseAuthenticate.php | 2 +- lib/Cake/Controller/Component/Auth/DigestAuthenticate.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php index d40ba99f2..a63c4c599 100644 --- a/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php @@ -82,7 +82,7 @@ abstract class BaseAuthenticate { } $result = ClassRegistry::init($userModel)->find('first', array( 'conditions' => $conditions, - 'recursive' => $this->settings['recursive'] + 'recursive' => (int)$this->settings['recursive'] )); if (empty($result) || empty($result[$model])) { return false; diff --git a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php index d2ba4bfd5..b09bd5c7c 100644 --- a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php @@ -78,6 +78,7 @@ class DigestAuthenticate extends BaseAuthenticate { ), 'userModel' => 'User', 'scope' => array(), + 'recursive' => 0, 'realm' => '', 'qop' => 'auth', 'nonce' => '', @@ -166,7 +167,7 @@ class DigestAuthenticate extends BaseAuthenticate { } $result = ClassRegistry::init($userModel)->find('first', array( 'conditions' => $conditions, - 'recursive' => 0 + 'recursive' => (int)$this->settings['recursive'] )); if (empty($result) || empty($result[$model])) { return false;