diff options
author | Michael Hamann <michael@content-space.de> | 2011-05-24 12:55:13 +0200 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2011-05-24 13:06:01 +0200 |
commit | 76388d5c9afc51bec28898bfa445600b5e5711bc (patch) | |
tree | d42db14c316b2ff2492772e16c900cb64019f09a /inc/auth | |
parent | dbb771bbe89f83ff82cffc491800ad0707288618 (diff) | |
download | rpg-76388d5c9afc51bec28898bfa445600b5e5711bc.tar.gz rpg-76388d5c9afc51bec28898bfa445600b5e5711bc.tar.bz2 |
Use login cookie for LDAP re-auth (closes FS#2260)
Since the password is no longer stored in the session, we need to use the login
cookie instead.
Diffstat (limited to 'inc/auth')
-rw-r--r-- | inc/auth/ldap.class.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php index 420043238..8eb411995 100644 --- a/inc/auth/ldap.class.php +++ b/inc/auth/ldap.class.php @@ -158,8 +158,11 @@ class auth_ldap extends auth_basic { // in some cases getUserData is called outside the authentication workflow // eg. for sending email notification on subscribed pages. This data might not // be accessible anonymously, so we try to rebind the current user here - $pass = PMA_blowfish_decrypt($_SESSION[DOKU_COOKIE]['auth']['pass'],auth_cookiesalt()); - $this->checkPass($_SESSION[DOKU_COOKIE]['auth']['user'], $pass); + list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); + if($loginuser && $loginpass){ + $loginpass = PMA_blowfish_decrypt($loginpass, auth_cookiesalt(!$loginsticky)); + $this->checkPass($loginuser, $loginpass); + } } $info['user'] = $user; |