6.0.0-alpha12
6/6/25

[#1220] LDAP store() fails on Kolab LDAP server
Summary LDAP store() fails on Kolab LDAP server
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners stuart (at)
Requester a.gungl (at) gmx (dot) de
Created 01/21/2005 (7441 days ago)
Due
Updated 01/17/2011 (5254 days ago)
Assigned 01/31/2005 (7431 days ago)
Resolved 02/04/2005 (7427 days ago)
Milestone
Patch No

History
02/04/2005 02:18:37 PM Chuck Hagenbuch Comment #9
State ⇒ Resolved
Reply to this comment
I'll look at the patch when I have a moment. Thanks.
02/04/2005 08:00:39 AM a (dot) gungl (at) gmx (dot) de Comment #8 Reply to this comment
After doing a fresh install on my test server, the solution in cvs is 
working. I don't know what was broken, so I think the ticket can get 
closed as solved.



If you like, you can nevertheless have a look at my proposed change. I 
believe it decreases the roundtrips to the LDAP server because during 
the first step (connect) the attribute/value pair is stored and 
re-used in subsequent requests, so that the iteration through the 
array isn't needed for the other steps.
02/03/2005 10:21:56 PM a (dot) gungl (at) gmx (dot) de Comment #7
New Attachment: ldap.php.diff Download
Reply to this comment
Here is an updated patch. There is still one TODO, the hardcoded 
'mail' (preferred lookup filed in LDAP) should be replaced by the 
first item in the array of the lookup fields. I'm lacking a bit of PHP 
skills here. I've tested the patch and it's working while the original 
changes alone don't work on my system and seem to be inefficient too.
02/01/2005 04:24:26 PM a (dot) gungl (at) gmx (dot) de Comment #6
New Attachment: ldap.php Download
Reply to this comment
Find a better (and working) solution in the attached file. Please 
note, I don't have PHP skills, so some optimization and roundup might 
be necessary. Feel free to change the code and remove my additional 
debug statements.
02/01/2005 02:26:15 PM a (dot) gungl (at) gmx (dot) de Comment #5 Reply to this comment
Hi, applying the change lets me loose all options I've set for a user 
(default identity, language settings, etc.). To get the settings 
working again, one can change the array in kolab.php back to



$params['uid'] = array('mail');



I wonder a little bit about the approach to the problem. Wouldn't it 
help to do the first LDAP lookup based on the data in the array to 
retrieve the primary mail address and operate on that one in all 
subsequent lookups?

Anyway, the current state of the sources isn't really an improvement.
01/31/2005 02:49:31 PM stuart Comment #4 Reply to this comment
Forgot to mention: the patch 
<http://cvs.horde.org/diff.php/framework/Prefs/Prefs/kolab.php?r1=1.2&r2=1.3&ty=u> is also needed in order for the Kolab prefs driver to actually make use of the new 
functionality.
01/31/2005 02:22:51 PM stuart Comment #3
State ⇒ Feedback
Reply to this comment
I've committed a patch that should fix this: 
<http://cvs.horde.org/diff.php/framework/Prefs/Prefs/ldap.php?r1=1.86&r2=1.87&ty=u>



One minor problem I've noticed is the "Last login:" notice on the 
portal page is not consistent between two logins using email and uid 
fields (it ends up being "Never" for one of the logins).
01/24/2005 08:36:06 AM a (dot) gungl (at) gmx (dot) de Comment #2 Reply to this comment
After some debugging it turned out that I can use my login name as 
well as my e-mail address to authenticate in the Horde frontend.

The ldap search is done via mail=<used login>, but this of course 
cannot work when I used my uid to log into Horde. The query would have 
to be uid=<used login> and that's not supported currently.

Using my e-mail address when logging into Horde results in proper LDAP 
lookups.
01/21/2005 02:43:39 PM Chuck Hagenbuch Assigned to stuart
State ⇒ Assigned
 
01/21/2005 02:39:03 PM a (dot) gungl (at) gmx (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ LDAP store() fails on Kolab LDAP server
Queue ⇒ Horde Base
State ⇒ Unconfirmed
Reply to this comment
The problem behind the errors is IMO that Horde tries to find instances of

class hordePerson using uid=<login> which will return an inetOrgPerson

instance in the Kolab LDAP tree.



If you manipulate Prefs/ldap.php, you can avoid those lines. Just comment

out the section below the comment /* Send the hash to the LDAP server. */

in Prefs_ldap.store() and let the "if ($search)" some lines above evaluate

to false.


Saved Queries