From 60066db7bee783d8f3b8690895164b7f2e2788e6 Mon Sep 17 00:00:00 2001 From: mguessan Date: Mon, 26 Jul 2010 23:45:18 +0000 Subject: [PATCH] Fix OSX directory search on uid git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1294 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/ldap/LdapConnection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/ldap/LdapConnection.java b/src/java/davmail/ldap/LdapConnection.java index fcc01281..2b5445a0 100644 --- a/src/java/davmail/ldap/LdapConnection.java +++ b/src/java/davmail/ldap/LdapConnection.java @@ -1088,13 +1088,14 @@ public class LdapConnection extends AbstractConnection { return null; } - ExchangeSession.Condition condition; + ExchangeSession.Condition condition = null; if (operator == LDAP_FILTER_EQUALITY) { condition = session.equals(contactAttributeName, value); } else if ("*".equals(value)) { condition = session.not(session.isNull(contactAttributeName)); - } else { + // do not allow substring search on integer field imapUid + } else if (!"imapUid".equals(contactAttributeName)){ // endsWith not supported by exchange, convert to contains if (mode == LDAP_SUBSTRING_FINAL || mode == LDAP_SUBSTRING_ANY) { condition = session.contains(contactAttributeName, value);