(fix) Session fix when SOGoEnableDomainBasedUID is enabled but logins are domain-less
parent
05b330e11b
commit
27a19ac956
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ Bug fixes
|
|||
- Fixed several sync issues on environments with multiple users (Zentyal)
|
||||
- Folders from other users will no longer appear on your Outlook (Zentyal)
|
||||
- Use right auth in multidomain environments in contacts and calendar from Outlook (Zentyal)
|
||||
- Session fix when SOGoEnableDomainBasedUID is enabled but logins are domain-less
|
||||
|
||||
2.3.1 (2015-07-23)
|
||||
------------------
|
||||
|
|
|
@ -780,7 +780,10 @@ static Class NSNullK;
|
|||
NSRange r;
|
||||
|
||||
r = [theUID rangeOfString: [NSString stringWithFormat: @"@%@", theDomain]];
|
||||
theUID = [theUID substringToIndex: r.location];
|
||||
|
||||
// We check if the range is ok here since we could be using DomainLessLogin
|
||||
if (r.location != NSNotFound)
|
||||
theUID = [theUID substringToIndex: r.location];
|
||||
}
|
||||
|
||||
sogoSources = [[self authenticationSourceIDsInDomain: theDomain] objectEnumerator];
|
||||
|
|
|
@ -183,7 +183,6 @@
|
|||
SOGoWebAuthenticator *auth;
|
||||
SOGoAppointmentFolders *calendars;
|
||||
SOGoUserDefaults *ud;
|
||||
SOGoSystemDefaults *sd;
|
||||
SOGoUser *loggedInUser;
|
||||
NSString *username, *password, *language, *domain, *remoteHost;
|
||||
NSArray *supportedLanguages;
|
||||
|
@ -224,13 +223,15 @@
|
|||
|
||||
response = [self responseWithStatus: 200
|
||||
andJSONRepresentation: json];
|
||||
|
||||
|
||||
// We get the proper username for cookie creation. If we are using a multidomain
|
||||
// environment with SOGoEnableDomainBasedUID, we could have to append the domain
|
||||
// to the username. Also when SOGoEnableDomainBasedUID is enabled, we could be in
|
||||
// the DomainLessLogin situation, so we would NOT add the domain. -getUIDForEmail
|
||||
// has all the logic for this, so lets use it.
|
||||
if ([domain isNotNull])
|
||||
{
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
if ([sd enableDomainBasedUID] &&
|
||||
[username rangeOfString: @"@"].location == NSNotFound)
|
||||
username = [NSString stringWithFormat: @"%@@%@", username, domain];
|
||||
username = [[SOGoUserManager sharedUserManager] getUIDForEmail: username];
|
||||
}
|
||||
|
||||
authCookie = [auth cookieWithUsername: username
|
||||
|
|
Loading…
Reference in New Issue