Do not consider fetching and storing user info for user ids or emails which contain spaces

maint-2.0.2
Wolfgang Sourdeau 2012-10-09 14:03:28 -04:00
parent 2be6922633
commit 37b9aca940
1 changed files with 4 additions and 1 deletions

View File

@ -785,9 +785,12 @@ static Class NSNullK;
NSString *aUID, *cacheUid, *jsonUser;
BOOL newUser;
/* TODO: we need to perform a better validity check on "uid" */
if ([uid isEqualToString: @"anonymous"])
currentUser = [self _contactInfosForAnonymous];
else if ([uid length] > 0)
else if ([uid length] > 0
&& [uid rangeOfString: @" "].location == NSNotFound)
{
// Remove the "@" prefix used to identified groups in the ACL tables.
aUID = [uid hasPrefix: @"@"] ? [uid substringFromIndex: 1] : uid;