Page 1 of 1

bug? Decorator munging attachments?

Posted: Thu Nov 20, 2008 7:43 pm
by gmorehoudh
This is related to the problems described in this thread: viewtopic.php?f=52&t=87046

I have discovered, in trying to get around the problems mentioned in that thread by attaching the info that I was previously prepending as a Swift_MessagePart, that Decorator will happily replace values in attachments that are in its allowed MIME type. I don't know if that's a bug or what, but there should definitely be a way to switch it off if not.

To reproduce, attach a file as text/plain that contains a replacement pattern for Decorator, and the resulting message will have the pattern replaced.

Presumably Decorator should not be touching anything with Content-Disposition: attachment.

This is Swift 3.3.2 on PHP 5.2.6.

Re: bug? Decorator munging attachments?

Posted: Fri Dec 05, 2008 10:28 pm
by Chris Corbyn
Hmm, this is correct and it was the intended behaviour, though I can see how that would have a negative side-effect. I'll have a think on a way to avoid that.

Re: bug? Decorator munging attachments?

Posted: Mon Dec 08, 2008 1:28 pm
by gmorehoudh
Seems like maybe a flag for 'don't touch attachments' that turns off Decorator touching anything with Content-disposition: attachment might do the trick.

Except maybe in the case of attaching other messages for forwarding or something, though that'd be a weird case in which to be using Decorator.