mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-22 21:39:28 +00:00
Monotone-Parent: befe03897e161f1796e6bb4fd47e4ff7f46528ab
Monotone-Revision: 78e8177b7871651ba9b05f971e1b40376fb5e49d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-11T14:31:02 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -424,8 +424,10 @@ static NSLock *lock;
|
||||
binddn: userDN
|
||||
credentials: passwordToCheck];
|
||||
NS_HANDLER
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
;
|
||||
NS_ENDHANDLER
|
||||
;
|
||||
}
|
||||
[bindConnection release];
|
||||
}
|
||||
}
|
||||
@@ -473,7 +475,8 @@ static NSLock *lock;
|
||||
|
||||
- (EOQualifier *) _qualifierForUIDFilter: (NSString *) uid
|
||||
{
|
||||
NSString *mailFormat, *fieldFormat, *escapedUid;
|
||||
NSString *mailFormat, *fieldFormat, *escapedUid, *currentField;
|
||||
NSEnumerator *bindFieldsEnum;
|
||||
NSMutableString *qs;
|
||||
|
||||
escapedUid = SafeLDAPCriteria (uid);
|
||||
@@ -481,9 +484,15 @@ static NSLock *lock;
|
||||
fieldFormat = [NSString stringWithFormat: @"(%%@='%@')", escapedUid];
|
||||
mailFormat = [[mailFields stringsWithFormat: fieldFormat]
|
||||
componentsJoinedByString: @" OR "];
|
||||
qs = [NSMutableString string];
|
||||
|
||||
[qs appendFormat: (@"(%@='%@') OR %@"), UIDField, escapedUid, mailFormat];
|
||||
qs = [NSMutableString stringWithFormat: @"(%@='%@') OR %@",
|
||||
UIDField, escapedUid, mailFormat];
|
||||
if (bindFields)
|
||||
{
|
||||
bindFieldsEnum = [[bindFields componentsSeparatedByString: @","]
|
||||
objectEnumerator];
|
||||
while ((currentField = [bindFieldsEnum nextObject]))
|
||||
[qs appendFormat: @" OR (%@='%@')", currentField, escapedUid];
|
||||
}
|
||||
|
||||
if (_filter && [_filter length])
|
||||
[qs appendFormat: @" AND %@", _filter];
|
||||
|
||||
Reference in New Issue
Block a user