diff --git a/NEWS b/NEWS index 3fe6c1638..5abe82a84 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ New features Bug fixes - [web] use the organizer's alarm by default when accepting IMIP messages (#3934) + - [web] fixed forwarding mails with attachments containing slashes in file names - [eas] don't include task folders if we hide them in SOGo (#4164) - [core] not using cleaned data when sending mails (#4199) - [core] don't update subscriptions when owner is not the active user (#3988) diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 1b21ff364..7bd3565fd 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -1158,7 +1158,14 @@ static NSString *userAgent = nil; name = [name substringFromIndex: r.location + 1]; if (![self isValidAttachmentName: name]) - return [self invalidAttachmentNameError: name]; + { + if ([name rangeOfString: @"/"].length) + { + name = [name stringByReplacingOccurrencesOfString: @"/" withString: @"-"]; + } + else + return [self invalidAttachmentNameError: name]; + } p = [self pathToAttachmentWithName: name]; if (![_attach writeToFile: p atomically: YES])