LDAP: fix bug 2919463, escape quotes in search filter

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@896 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-12-23 09:17:20 +00:00
parent 3f22413dda
commit fa7ed285b1
1 changed files with 1 additions and 1 deletions

View File

@ -1045,7 +1045,7 @@ public class LdapConnection extends AbstractConnection {
if (mode == LDAP_SUBSTRING_FINAL || mode == LDAP_SUBSTRING_ANY) {
buffer.append('%');
}
buffer.append(value);
buffer.append(value.replaceAll("'", "''"));
// endsWith not supported by exchange, always append %
buffer.append('%');
buffer.append('\'');