mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-14 16:07:15 +00:00
escape the username part of the tablename in order to obtain an acceptable SQL identifier
This commit is contained in:
1 parent
6d8c328910
commit
331b61d9b2
1 file changed
+3
-1
@@ -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