Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any value of address field in advanced contact search return all contacts from ldap #6084

Closed
inpos opened this issue Dec 7, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@inpos
Copy link

commented Dec 7, 2017

Hi.
In Address book go to advanced search.
Fill only address field with any value and click search.
Return all contacts from all user address books.

Roundcube version: 1.3.1

@alecpl

This comment has been minimized.

Copy link
Member

commented Dec 8, 2017

Works for me. Please, update to 1.3.3 and try again. What type of addressbooks are you using? Try with disabled all plugins.

@alecpl alecpl added the need feedback label Dec 8, 2017

@inpos

This comment has been minimized.

Copy link
Author

commented Dec 8, 2017

I've disabled all plugins. Same result.
I use LDAP Address book.
I was wrong said that search returns all contacts from all user address book.
I've created contact in SQL Address book and fill city with some name (ex. GreatCity).
When search with address "abra-kadabra" it's return all contacts from LDAP address book.
When search with address "GreatCity" it's return all contacts from LDAP address book and one contact from SQL address book with city "GreatCity".
What I must configure to proper address search in LDAP address book?
My fieldmap in LDAP address book config

'fieldmap' => 
    array (
      'name' => 'displayName',
      'surname' => 'sn',
      'firstname' => 'givenName',
      'email' => 'mail:*',
      'phone:home' => 'homePhone',
      'phone:work' => 'telephoneNumber',
      'phone:mobile' => 'mobile',
      'phone:pager' => 'otherTelephone',
      'phone:workfax' => 'facsimileTelephoneNumber',
      'street' => 'street',
      'zipcode' => 'postalCode',
      'region' => 'st',
      'locality' => 'l',
      'country' => 'c',
      'organization' => 'company',
      'department' => 'department',
      'jobtitle' => 'title',
      'notes' => 'description',
      'photo' => 'thumbnailPhoto',
    ),
@alecpl

This comment has been minimized.

Copy link
Member

commented Dec 8, 2017

Enable ldap_debug and provide the log, please. Could you be more specific on exactly which fields are problematic?

@inpos

This comment has been minimized.

Copy link
Author

commented Dec 9, 2017

I've done debug myself and determined that I must specify address fieldmaps in ldap config like this:

      'address:street' => 'street',
      'address:zipcode' => 'postalCode',
      'address:region' => 'st',
      'address:locality' => 'l',
      'address:country' => 'c',

Otherwise this code block don't create subarray "attributes" for array-item "address".
Therefore generated ldap filter don't contain necessary ldap attributes (street, postalcode, st, l, c).

I think correct address field map must be documented.

@inpos inpos changed the title Any value of address field in advanced contact search return all contacts Any value of address field in advanced contact search return all contacts from ldap Dec 9, 2017

@alecpl alecpl added this to the 1.3.4 milestone Dec 26, 2017

alecpl added a commit that referenced this issue Dec 26, 2017

alecpl added a commit that referenced this issue Dec 26, 2017

@alecpl

This comment has been minimized.

Copy link
Member

commented Dec 26, 2017

The configuration format you used initially is still supported, but there was a regression. Fixed.

@alecpl alecpl closed this Dec 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.