From 37b9aca9408ab3704ae2431bcafdafa7c7b57017 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 9 Oct 2012 14:03:28 -0400 Subject: [PATCH] Do not consider fetching and storing user info for user ids or emails which contain spaces --- SoObjects/SOGo/SOGoUserManager.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SoObjects/SOGo/SOGoUserManager.m b/SoObjects/SOGo/SOGoUserManager.m index acba8c7f5..af11e0db2 100644 --- a/SoObjects/SOGo/SOGoUserManager.m +++ b/SoObjects/SOGo/SOGoUserManager.m @@ -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;