[Tickets #5864] LDAP SessionHandler dosn't respect the version parameter
bugs at bugs.horde.org
bugs at bugs.horde.org
Mon Nov 5 13:59:38 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=5864
-----------------------------------------------------------------------
Ticket | 5864
Created By | herde at tu-harburg.de
Summary | LDAP SessionHandler dosn't respect the version parameter
Queue | Horde Framework Packages
Version | FRAMEWORK_3
Type | Bug
State | Unconfirmed
Priority | 1. Low
Owners |
-----------------------------------------------------------------------
herde at tu-harburg.de (2007-11-05 05:59) wrote:
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']);
}
More information about the bugs
mailing list