| 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 |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ LDAP SessionHandler dosn't respect the version parameter
Due ⇒ 11/5/07
Queue ⇒ Horde Framework Packages
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']);
}