6.0.0-RC7
6/18/26

[#5864] LDAP SessionHandler dosn't respect the version parameter
Summary LDAP SessionHandler dosn't respect the version parameter
Queue Horde Framework Packages
Queue Version FRAMEWORK_3
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester herde (at) tu-harburg (dot) de
Created 11/5/07 (6800 days ago)
Due 11/5/07 (6800 days ago)
Updated 11/5/07 (6800 days ago)
Assigned
Resolved 11/5/07 (6800 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
244 Chuck Hagenbuch Comment #2
Assigned to Chuck Hagenbuch
State ⇒ Resolved
Reply to this comment
Fixed for Horde 3.2, thanks!
381 herde (at) tu-harburg (dot) de Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ LDAP SessionHandler dosn't respect the version parameter
Due ⇒ 11/5/07
Queue ⇒ Horde Framework Packages
Reply to this comment
we recognised that horde 3.1.5 is not able to authenticate users 
against a openldap 2.3.39 directory serve. This is the error message:



res_errno: 2, res_error: <historical protocol version requested, use 
LDAPv3 instead>, res_matched: <>



in the apache log when we set the ldap debug level 7.



we found at last that ldap_connect always is preceeded by the 
ldap_set_option call for parameter LDAP_OPT_PROTOCOL_VERSION except in 
procedure open of the ldap SessionHandler. We fixed it by copying the 
appropriate if clause out of the Auth/ldap.php : Patch is



***************

*** 38,45 ****

--- 38,57 ----

        */

       function open($save_path, $session_name)

       {

           $this->_conn = @ldap_connect($this->_params['hostspec'], 
$this->_params['port']);

+

+         if (isset($this->_params['version'])) {

+             if (!ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION,

+                                  $this->_params['version'])) {

+                 Horde::logMessage(sprintf('Set LDAP protocol version 
to %d failed: [%d] %s',

+                                           $this->_params['version'],

+                                           ldap_errno($conn),

+                                           ldap_error($conn)),

+                                   __FILE__, __LINE__, PEAR_LOG_ERR);

+             }

+         }

+

           return @ldap_bind($this->_conn, $this->_params['dn'], 
$this->_params['password']);

       }




Saved Queries