6.0.0-git
2019-04-24

[#12868] Bad Search Filter for changing password using LDAP Driver
Summary Bad Search Filter for changing password using LDAP Driver
Queue Horde Groupware Webmail Edition
Queue Version 5.1.3
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester asa (at) isac (dot) gov (dot) in
Created 2013-11-28 (1973 days ago)
Due
Updated 2013-11-28 (1973 days ago)
Assigned
Resolved 2013-11-28 (1973 days ago)
Milestone
Patch No

History
2013-11-28 09:12:24 Jan Schneider State ⇒ Not A Bug
 
2013-11-28 04:47:43 asa (at) isac (dot) gov (dot) in Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Bad Search Filter for changing password using LDAP Driver
Queue ⇒ Horde Groupware Webmail Edition
Milestone ⇒
Patch ⇒ No
Reply to this comment
I have enabled findUserDn function in passwd/lib/Ldap.php by doing the 
following changes.

diff Ldap.php.ori Ldap.php
109,110c109,112
<             // $this->_userdn = $this->_ldap->findUserDN($user);
<             $this->_userdn = $this->_params['uid'] . '=' . $user . 
',' . $this->_params['basedn'];
---
             $ldapwithdomain = explode("@", $user);
             $ldapuser = $ldapwithdomain[0];
             $this->_userdn = $this->_ldap->findUserDN($ldapuser);
             // $this->_userdn = $this->_params['uid'] . '=' . $user 
. ',' . $this->_params['basedn'];
findUserDN function is available in /usr/share/pear/Horde/Ldap.php

but, findUserDN is not correctly setting the parameters passed.

below is the output.

Nov 21 2013 14:53:57 DEBUG: HORDE [passwd] Failure in changing password for
LDAP Server: Bad search filter
Parameters:
Base: dc=xxx
Filter: (&(objectclass=)(=asa)

In the above statements, dc=xxx is correct.
the Filter should have populated as

(mailacceptinggeneralid=asa)

I have set uid=> mailacceptinggeneraid
and filter => ''

in backends.local.php of passwd for LDAP driver.

Saved Queries