6.0.0-alpha12
6/12/25

[#12298] fix _buildSearchQuery() to generate correct search filter
Summary fix _buildSearchQuery() to generate correct search filter
Queue Turba
Queue Version Git master
Type Bug
State Duplicate
Priority 3. High
Owners
Requester Joerg.Pulz (at) frm2 (dot) tum (dot) de
Created 06/04/2013 (4391 days ago)
Due
Updated 06/04/2013 (4391 days ago)
Assigned
Resolved 06/04/2013 (4391 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
06/04/2013 10:40:46 AM Jan Schneider Comment #3
State ⇒ Duplicate
Reply to this comment
06/04/2013 10:29:31 AM Joerg (dot) Pulz (at) frm2 (dot) tum (dot) de Comment #2
New Attachment: turba_ldapfilter_fix[1].diff Download
Reply to this comment
Sorry, wrong patch attached in the initial report.

Here is the correct one.
06/04/2013 10:26:33 AM Joerg (dot) Pulz (at) frm2 (dot) tum (dot) de Comment #1
Priority ⇒ 3. High
New Attachment: turba_ldapfilter_fix.diff Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ fix _buildSearchQuery() to generate correct search filter
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
Turba generates wrong LDAP search filters when manually searching an 
contact or when Kronolith asks for the freebusyUrl.

The generated search filter for an manually contact search looks like:
(|)(mail=*<searchstring>*)(telephonenumber=*<searchstring>*)

but should look like:
(cn=*<searchstring>*)(mail=*<searchstring>*)(telephonenumber=*<searchstring>*)

The generated search filter for Kronolith automated freebusyUrl search 
  looks like:
(|)

but should look like:
(mail=user@domain.tld)

The attached patch fixes this. I don't know why "$key == 'OR'" causes 
this error as the value of $key is "0" when this occurs.

Saved Queries