diff --git a/ChangeLog b/ChangeLog index a27c11639..39eeb62a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-06-04 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactGCSFolder.m + (-lookupContactsWithFilter:sortBy:ordering:): same as below. + * SoObjects/SOGo/LDAPSource.m: properly escaped user-entered strings which may contain quotes and thereby mess up the LDAP queries. diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index 0ba541de5..8c627c1e4 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -216,7 +216,8 @@ if (filter && [filter length] > 0) { - filter = [filter stringByReplacingString: @"'" withString: @"\\'\\'"]; + filter = [[filter stringByReplacingString: @"\\" withString: @"\\\\"] + stringByReplacingString: @"'" withString: @"\\'\\'"]; qs = [NSString stringWithFormat: @"(c_sn isCaseInsensitiveLike: '%@%%') OR " @"(c_givenname isCaseInsensitiveLike: '%@%%') OR "