mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-21 14:22:44 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
- (NSString *) asMD5String;
|
||||
- (NSString *) asSHA1String;
|
||||
|
||||
- (NSString *) asSafeSQLString;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -589,5 +589,10 @@ static NSMutableCharacterSet *safeLDIFStartChars = nil;
|
||||
return [NSString stringWithUTF8String: buf];
|
||||
}
|
||||
|
||||
- (NSString *) asSafeSQLString
|
||||
{
|
||||
return [[self stringByReplacingString: @"\\" withString: @"\\\\"]
|
||||
stringByReplacingString: @"'" withString: @"\\'"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user