(fix) avoid appending the domain unconditionally when SOGoEnableDomainBasedUID is set to YES

pull/85/head
Ludovic Marcotte 2015-05-19 13:48:59 -04:00
parent ae72c2f1d5
commit 416711ea43
4 changed files with 9 additions and 4 deletions

1
NEWS
View File

@ -54,6 +54,7 @@ Bug fixes
- now correctly handle multiple email addresses in the GAL over EAS (#3102)
- now handle very large amount of participants correctly (#3175)
- fix message bodies not shown on some EAS devices (#3173)
- avoid appending the domain unconditionally when SOGoEnableDomainBasedUID is set to YES
2.2.17a (2015-03-15)
--------------------

View File

@ -427,7 +427,8 @@
{
currentUser = [users objectAtIndex: i];
field = [currentUser objectForKey: @"c_uid"];
if (enableDomainBasedUID)
if (enableDomainBasedUID &&
[field rangeOfString: @"@"].location == NSNotFound)
field = [NSString stringWithFormat: @"%@@%@", field, domain];
if (![field isEqualToString: login])
{

View File

@ -652,7 +652,8 @@ static Class NSNullK;
// internal cache.
[currentUser setObject: [newPassword asSHA1String] forKey: @"password"];
sd = [SOGoSystemDefaults sharedSystemDefaults];
if ([sd enableDomainBasedUID])
if ([sd enableDomainBasedUID] &&
[login rangeOfString: @"@"].location == NSNotFound)
userLogin = [NSString stringWithFormat: @"%@@%@", login, domain];
else
userLogin = login;

View File

@ -228,7 +228,8 @@
if ([domain isNotNull])
{
sd = [SOGoSystemDefaults sharedSystemDefaults];
if ([sd enableDomainBasedUID])
if ([sd enableDomainBasedUID] &&
[username rangeOfString: @"@"].location == NSNotFound)
username = [NSString stringWithFormat: @"%@@%@", username, domain];
}
@ -587,7 +588,8 @@
if ([domain isNotNull])
{
sd = [SOGoSystemDefaults sharedSystemDefaults];
if ([sd enableDomainBasedUID])
if ([sd enableDomainBasedUID] &&
[username rangeOfString: @"@"].location == NSNotFound)
username = [NSString stringWithFormat: @"%@@%@", username, domain];
}