mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-27 20:26:23 +00:00
escape the username part of the tablename in order to obtain an acceptable SQL identifier
This commit is contained in:
@@ -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: @"/"]];
|
||||
|
||||
Reference in New Issue
Block a user