Avoid uid+attributes entries on shared cache
In multidomain environments this will produce that info@domain1.com can read info@domain2.com emails when info@domain2.com log in after info@domain1.com is already logged in. If multidomain is not enabled, this action is not needed because uid+attributes has been already saved on shared cache
This commit is contained in:
parent
79bfc7aedf
commit
9922ec56d9
|
@ -806,26 +806,22 @@ static Class NSNullK;
|
|||
withLogin: (NSString *) login
|
||||
{
|
||||
NSEnumerator *emails;
|
||||
NSString *key;
|
||||
NSString *key, *user_json;
|
||||
|
||||
[[SOGoCache sharedCache]
|
||||
setUserAttributes: [newUser jsonRepresentation]
|
||||
user_json = [newUser jsonRepresentation];
|
||||
[[SOGoCache sharedCache] setUserAttributes: user_json
|
||||
forLogin: login];
|
||||
if (![newUser isKindOfClass: NSNullK])
|
||||
{
|
||||
key = [newUser objectForKey: @"c_uid"];
|
||||
if (key && ![key isEqualToString: login])
|
||||
[[SOGoCache sharedCache]
|
||||
setUserAttributes: [newUser jsonRepresentation]
|
||||
forLogin: key];
|
||||
|
||||
emails = [[newUser objectForKey: @"emails"] objectEnumerator];
|
||||
while ((key = [emails nextObject]))
|
||||
[[SOGoCache sharedCache]
|
||||
setUserAttributes: [newUser jsonRepresentation]
|
||||
{
|
||||
if (![key isEqualToString: login])
|
||||
[[SOGoCache sharedCache] setUserAttributes: user_json
|
||||
forLogin: key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *) _contactInfosForAnonymous
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue