escape the username part of the tablename in order to obtain an acceptable SQL identifier

pull/4/merge
Wolfgang Sourdeau 2012-10-22 15:17:47 -04:00
parent 6d8c328910
commit 331b61d9b2
1 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,7 @@
#import <SOGo/SOGoDomainDefaults.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/NSString+Utilities.h>
#import <Mailer/SOGoMailAccount.h>
#import <Mailer/SOGoMailAccounts.h>
@ -291,7 +292,8 @@ static NSMapTable *contextsTable = nil;
{
/* If "OCSFolderInfoURL" is properly configured, we must have 5
parts in this url. */
ocFSTableName = [NSString stringWithFormat: @"socfs_%@", username];
ocFSTableName = [NSString stringWithFormat: @"socfs_%@",
[username asCSSIdentifier]];
[parts replaceObjectAtIndex: 4 withObject: ocFSTableName];
folderTableURL
= [NSURL URLWithString: [parts componentsJoinedByString: @"/"]];