Monotone-Parent: ebf06451111f1c4e8049341f943198ffce019019

Monotone-Revision: 9c6dc6a8ae6889a9f5df735cb84d50ea6a07241d

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-09-29T00:23:23
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2007-09-29 00:23:23 +00:00
parent 5b11d2b768
commit 0685bba9a5
3 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,13 @@
2007-09-28 Francis Lachapelle <flachapelle@inverse.ca>
* SoObjects/Mailer/SOGoDraftObject.m
([SOGoDraftObject -isValidAttachmentName:_name]): removed
constraint on space in file name.
([SOGoDraftObject -saveAttachment:_attachwithMetadata:metadata]):
now removes from file name all characters preceding a backslash.
This happens with IE7 because the complete attachment file path
is sent.
2007-09-25 Francis Lachapelle <flachapelle@inverse.ca>
* SoObjects/Appointments/SOGoAptMailNotification.m

2
NEWS
View File

@ -11,7 +11,7 @@
- added checkmarks in live search options popup menus;
- added browser detection with recommanded alternatives;
- support for resizable columns in tables;
- improved IE7 and Safari support: attendees selector;
- improved IE7 and Safari support: attendees selector, email file attachments;
- countless bugfixes;
0.9.0-20070824

View File

@ -578,7 +578,7 @@ static BOOL showTextAttachmentsInline = NO;
- (BOOL) isValidAttachmentName: (NSString *) _name
{
static NSString *sescape[] = { @"/", @"..", @"~", @"\"", @"'", @" ", nil };
static NSString *sescape[] = { @"/", @"..", @"~", @"\"", @"'", nil };
unsigned i;
NSRange r;
@ -611,7 +611,8 @@ static BOOL showTextAttachmentsInline = NO;
withMetadata: (NSDictionary *) metadata
{
NSString *p, *name, *mimeType;
NSRange r;
if (![_attach isNotNull]) {
return [NSException exceptionWithHTTPStatus:400 /* Bad Request */
reason: @"Missing attachment content!"];
@ -621,7 +622,13 @@ static BOOL showTextAttachmentsInline = NO;
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
reason: @"Could not create folder for draft!"];
}
name = [metadata objectForKey: @"filename"];
r = [name rangeOfString: @"\\"
options: NSBackwardsSearch];
if (r.length > 0)
name = [name substringFromIndex: r.location + 1];
if (![self isValidAttachmentName: name])
return [self invalidAttachmentNameError: name];