See ChangeLog
Monotone-Parent: e1912bf4962632854ed7898edea3ca2ba3a70406 Monotone-Revision: 1e01e7055612c8aa2f2c0e9151035ef348604b8e Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-09-24T17:50:40 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
fa522147e6
commit
38af9bc66b
|
@ -1,6 +1,8 @@
|
|||
2010-09-24 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Added caching support for LDAP-based groups
|
||||
* SoObjects/SOGo/LDAPSource.m
|
||||
Improved SafeLDAPCriteria() to properly escape '%'
|
||||
|
||||
2010-09-22 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
|
|
|
@ -40,8 +40,9 @@
|
|||
|
||||
#import "LDAPSource.h"
|
||||
|
||||
#define SafeLDAPCriteria(x) [[x stringByReplacingString: @"\\" withString: @"\\\\"] \
|
||||
stringByReplacingString: @"'" withString: @"\\'"]
|
||||
#define SafeLDAPCriteria(x) [[[x stringByReplacingString: @"\\" withString: @"\\\\"] \
|
||||
stringByReplacingString: @"'" withString: @"\\'"] \
|
||||
stringByReplacingString: @"%" withString: @"%%"]
|
||||
static NSArray *commonSearchFields;
|
||||
|
||||
@implementation LDAPSource
|
||||
|
@ -377,7 +378,7 @@ static NSArray *commonSearchFields;
|
|||
|
||||
qs = [NSMutableString string];
|
||||
|
||||
escapedUid = SafeLDAPCriteria (uid);
|
||||
escapedUid = SafeLDAPCriteria(uid);
|
||||
|
||||
fields = [bindFields objectEnumerator];
|
||||
while ((currentField = [fields nextObject]))
|
||||
|
@ -548,7 +549,7 @@ static NSArray *commonSearchFields;
|
|||
EOQualifier *qualifier;
|
||||
NSMutableString *qs;
|
||||
|
||||
escapedFilter = SafeLDAPCriteria (filter);
|
||||
escapedFilter = SafeLDAPCriteria(filter);
|
||||
if ([escapedFilter length] > 0)
|
||||
{
|
||||
fieldFormat = [NSString stringWithFormat: @"(%%@='%@*')", escapedFilter];
|
||||
|
@ -581,7 +582,7 @@ static NSArray *commonSearchFields;
|
|||
NSEnumerator *bindFieldsEnum;
|
||||
NSMutableString *qs;
|
||||
|
||||
escapedUid = SafeLDAPCriteria (uid);
|
||||
escapedUid = SafeLDAPCriteria(uid);
|
||||
|
||||
fieldFormat = [NSString stringWithFormat: @"(%%@='%@')", escapedUid];
|
||||
mailFormat = [[mailFields stringsWithFormat: fieldFormat]
|
||||
|
@ -890,7 +891,7 @@ static NSArray *commonSearchFields;
|
|||
{
|
||||
ldapConnection = [self _ldapConnection];
|
||||
s = [NSString stringWithFormat: @"(%@='%@')",
|
||||
IDField, SafeLDAPCriteria (theID)];
|
||||
IDField, SafeLDAPCriteria(theID)];
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat: s];
|
||||
attributes = [self _searchAttributes];
|
||||
|
||||
|
@ -999,7 +1000,7 @@ static NSArray *commonSearchFields;
|
|||
ldapConnection = [self _ldapConnection];
|
||||
|
||||
s = [NSString stringWithFormat: @"(%@='%@')",
|
||||
theAttribute, SafeLDAPCriteria (theValue)];
|
||||
theAttribute, SafeLDAPCriteria(theValue)];
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat: s];
|
||||
|
||||
// We look for additional attributes - the ones related to group
|
||||
|
|
Loading…
Reference in New Issue