mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 22:53:18 +00:00
Monotone-Parent: 0dd43a8d058a214365a36681cd3df3b5c919b0f1
Monotone-Revision: f537b5805052d9a9bfb04e2f651abef055885f53 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-10T19:50:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user