Monotone-Parent: 0dd43a8d058a214365a36681cd3df3b5c919b0f1
Monotone-Revision: f537b5805052d9a9bfb04e2f651abef055885f53 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-10T19:50:27 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
fab74a2801
commit
c966b00c70
|
@ -1,3 +1,10 @@
|
|||
2008-09-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject
|
||||
-isValidAttachmentName:filename]): accept all filenames except
|
||||
".", ".." and those that contain "/". Any other is valid and will
|
||||
be accepted.
|
||||
|
||||
2008-09-08 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/LDAPSource.m ([LDAPSource
|
||||
|
|
|
@ -719,23 +719,9 @@ static BOOL showTextAttachmentsInline = NO;
|
|||
|
||||
- (BOOL) isValidAttachmentName: (NSString *) filename
|
||||
{
|
||||
static NSString *sescape[] = { @"/", @"..", @"~", @"\"", @"'", nil };
|
||||
unsigned int i;
|
||||
NSRange r;
|
||||
BOOL result;
|
||||
|
||||
result = ([filename length] && ![filename hasPrefix: @"."]);
|
||||
i = 0;
|
||||
while (result && sescape[i])
|
||||
{
|
||||
r = [filename rangeOfString: sescape[i]];
|
||||
if (r.length > 0)
|
||||
result = NO;
|
||||
else
|
||||
i++;
|
||||
}
|
||||
|
||||
return result;
|
||||
return (!([filename rangeOfString: @"/"].length
|
||||
|| [filename isEqualToString: @"."]
|
||||
|| [filename isEqualToString: @".."]));
|
||||
}
|
||||
|
||||
- (NSString *) pathToAttachmentWithName: (NSString *) _name
|
||||
|
|
Loading…
Reference in New Issue