lib/Auth

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Thu Aug 30 17:41:36 CEST 2012


 lib/Auth/LDAP.php |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit f7b522de0d7cfc761ca27adc94f4a265fc45fa8d
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Aug 30 17:41:04 2012 +0200

    Always fully qualify the username passed on to Net_LDAP3::login()

diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index df4f960..3120efa 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -110,6 +110,11 @@ class LDAP extends Net_LDAP3 {
             return false;
         }
 
+        // We'll want to pass on a qualified username to Net_LDAP3::login()
+        if (!strpos($username, '@')) {
+            $username = $username . '@' . $this->domain;
+        }
+
         $result = $this->login($username, $password);
 
         if (!$result) {





More information about the commits mailing list