Page MenuHomePhorge

Contacts search with $fields=* does not work when contact has a photo
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Create a contact with surname: "last" and some photo in Kolab addressbook (not LDAP)
  2. Goto Addressbook search box, in search options select "All fields".
  3. Search for "last" word.

Observe the contact is not found. When you remove the photo the contact can be found with the same search criteria

This is because with "All fields" kolab_addressbook will use all defined fields, i.e. also photo (and other fields that may contain binary data). For searching we use rcube_utils::words_match(). This does not work with binary content.

I think the correct fix for this is to define list of "safe" fields for use in "All fields" searches. Optionally we could make sure words_match() works with this content (possible because the problem is with tokenize_string(), so we can handle it).

Details

Ticket Type
Task

Event Timeline

machniak claimed this task.
machniak raised the priority of this task from to 60.
machniak updated the task description. (Show Details)
machniak changed Ticket Type from Task to Task.
machniak subscribed.
machniak mentioned this in Unknown Object (Diffusion Commit).Nov 18 2015, 1:29 PM
machniak mentioned this in Unknown Object (Diffusion Commit).