mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
LDAP: fix contact search, do not send unrequested attributes
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@701 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
7bfc952437
commit
8183986842
@ -789,9 +789,17 @@ public class LdapConnection extends AbstractConnection {
|
||||
// convert Contact entries
|
||||
for (Map.Entry<String, String> entry : person.entrySet()) {
|
||||
String contactAttribute = entry.getKey();
|
||||
// get converted attribute name
|
||||
String ldapAttribute = CONTACT_ATTRIBUTE_MAP.get(contactAttribute);
|
||||
// no conversion, use exchange attribute name
|
||||
if (ldapAttribute == null){
|
||||
ldapAttribute = contactAttribute;
|
||||
}
|
||||
String value = entry.getValue();
|
||||
ldapPerson.put(ldapAttribute == null ? contactAttribute : ldapAttribute, value);
|
||||
if (value != null
|
||||
&& (returnAllAttributes || returningAttributes.contains(ldapAttribute.toLowerCase()))) {
|
||||
ldapPerson.put(ldapAttribute, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user