mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 10:55:25 +00:00
See ChangeLog
Monotone-Parent: 6447c0cddc2aaf8251e73cdfed175eed08cf5bac Monotone-Revision: 32e14dc57c4f6d9a43de5dfdf3c298091cbf84ea Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-01-08T17:48:45 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -266,7 +266,7 @@ static NSArray *commonSearchFields;
|
||||
UIDField: (NSString *) newUIDField
|
||||
mailFields: (NSArray *) newMailFields
|
||||
IMAPHostField: (NSString *) newIMAPHostField
|
||||
andBindFields: (NSString *) newBindFields
|
||||
andBindFields: (id) newBindFields
|
||||
{
|
||||
ASSIGN (baseDN, [newBaseDN lowercaseString]);
|
||||
if (newIDField)
|
||||
@@ -280,7 +280,28 @@ static NSArray *commonSearchFields;
|
||||
if (newMailFields)
|
||||
ASSIGN (mailFields, newMailFields);
|
||||
if (newBindFields)
|
||||
ASSIGN (bindFields, newBindFields);
|
||||
{
|
||||
// Before SOGo v1.2.0, bindFields was a comma-separated list
|
||||
// of values. So it could be configured as:
|
||||
//
|
||||
// bindFields = foo;
|
||||
// bindFields = "foo, bar, baz";
|
||||
//
|
||||
// SOGo v1.2.0 and upwards redefined that parameter as an array
|
||||
// so we would have instead:
|
||||
//
|
||||
// bindFields = (foo);
|
||||
// bindFields = (foo, bar, baz);
|
||||
//
|
||||
// We check for the old format and we support it.
|
||||
if ([newBindFields isKindOfClass: [NSArray class]])
|
||||
ASSIGN(bindFields, newBindFields);
|
||||
else
|
||||
{
|
||||
[self logWithFormat: @"WARNING: using old bindFields format - please update it"];
|
||||
ASSIGN(bindFields, [newBindFields componentsSeparatedByString: @","]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) _setupEncryption: (NGLdapConnection *) encryptedConn
|
||||
@@ -351,7 +372,7 @@ static NSArray *commonSearchFields;
|
||||
|
||||
escapedUid = SafeLDAPCriteria (uid);
|
||||
|
||||
fields = [[bindFields componentsSeparatedByString: @","] objectEnumerator];
|
||||
fields = [bindFields objectEnumerator];
|
||||
while ((currentField = [fields nextObject]))
|
||||
[qs appendFormat: @" OR (%@='%@')", currentField, escapedUid];
|
||||
|
||||
@@ -482,8 +503,7 @@ static NSArray *commonSearchFields;
|
||||
UIDField, escapedUid, mailFormat];
|
||||
if (bindFields)
|
||||
{
|
||||
bindFieldsEnum = [[bindFields componentsSeparatedByString: @","]
|
||||
objectEnumerator];
|
||||
bindFieldsEnum = [bindFields objectEnumerator];
|
||||
while ((currentField = [bindFieldsEnum nextObject]))
|
||||
[qs appendFormat: @" OR (%@='%@')", [currentField stringByTrimmingSpaces], escapedUid];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user