mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 12:00:33 +00:00
See ChangeLog.
Monotone-Parent: 42fa26da9b1def06a194726cab4199338a4bdf4c Monotone-Revision: 88b07aa8edf775fa02705a9c03a0f8f14f905db3 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-07-15T22:22:11 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -251,21 +251,23 @@
|
||||
r = [decodedValue rangeOfString: @":"];
|
||||
*theLogin = [decodedValue substringToIndex: r.location];
|
||||
*thePassword = [decodedValue substringFromIndex: r.location+1];
|
||||
|
||||
r = [*theLogin rangeOfString: @"@" options: NSBackwardsSearch];
|
||||
if (r.location != NSNotFound)
|
||||
*theDomain = nil;
|
||||
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
if ([sd addDomainToUID])
|
||||
{
|
||||
// The domain is probably appended to the username;
|
||||
// make sure it is defined as a login domain in the configuration.
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
*theDomain = [*theLogin substringFromIndex: (r.location + r.length)];
|
||||
if ([[sd loginDomains] containsObject: *theDomain])
|
||||
*theLogin = [*theLogin substringToIndex: r.location];
|
||||
else
|
||||
*theDomain = nil;
|
||||
r = [*theLogin rangeOfString: @"@" options: NSBackwardsSearch];
|
||||
if (r.location != NSNotFound)
|
||||
{
|
||||
// The domain is probably appended to the username;
|
||||
// make sure it is defined as a domain in the configuration.
|
||||
*theDomain = [*theLogin substringFromIndex: (r.location + r.length)];
|
||||
if ([[sd domainIds] containsObject: *theDomain])
|
||||
*theLogin = [*theLogin substringToIndex: r.location];
|
||||
else
|
||||
*theDomain = nil;
|
||||
}
|
||||
}
|
||||
else
|
||||
*theDomain = nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user