Steps to reproduce:
- Create a contact with surname: "last" and some photo in Kolab addressbook (not LDAP)
- Goto Addressbook search box, in search options select "All fields".
- 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).