Monotone-Parent: a1ab19d0430de4dc429a378a11f7f8e16772efd3

Monotone-Revision: 7ed8d0e95d642fed8f24b92fc18f0e2abc1b90d0

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-06-16T14:38:14
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-06-16 14:38:14 +00:00
parent 4a9031ed2f
commit c3eaf9f3da
3 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2011-06-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSString+Utilities.m (-asSafeSQLString): new
method that properly escape strings passed as values in SQL
queries.
2011-06-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreSpoolerContext.[hm]: new backend context.

View File

@@ -72,6 +72,7 @@
- (NSString *) asMD5String;
- (NSString *) asSHA1String;
- (NSString *) asSafeSQLString;
@end

View File

@@ -589,5 +589,10 @@ static NSMutableCharacterSet *safeLDIFStartChars = nil;
return [NSString stringWithUTF8String: buf];
}
- (NSString *) asSafeSQLString
{
return [[self stringByReplacingString: @"\\" withString: @"\\\\"]
stringByReplacingString: @"'" withString: @"\\'"];
}
@end