6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
12/5/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#12089] Wrong LDap search created
*
Your Email Address
*
Spam protection
Enter the letters below:
\ /. .. ..___.___. >< |__||__|[__ _/ / \| || || ./__.
Comment
> When Activesync requests a contact search, Driver.php returns : > > (&(givenname=Maclean)(sn=Maclean)(|(displayname=*Maclean*)(mail=*Maclean*))) > > Which never succeeds. I expect the returned search to be more like: > > (&(|(givenname=Maclean)(sn=Maclean))(|(displayname=*Maclean*)(mail=*Maclean*))) > > Looking at turba/lib/Driver/Ldap.php in function _buildSearchQuery, > the passed criteria is placed in a foreach that does not pull out the > passed array keys. Changing : > > foreach ($criteria as $vals) { > to > foreach ($criteria as $key => $vals) { > > and then checking for the key value in addition to the OR already > tested for by changing : > > if (!empty($vals['OR'])) { > > to > > if ($key === 'OR' || !empty($vals['OR'])) { > > makes the returned search : > > (&(|(givenname=Maclean)(sn=Maclean))(|(|(|(displayname=Maclean*)(displayname=* Maclean*))(|(mail=Maclean*)(mail=* > Maclean*))))) > > which does return values. > > Sorry for not including a patch, but I am not convinced I chased down > the correct solution. > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers