On 04/01/2013 10:51 PM, Michael Heydekamp wrote:
So apparently the charset defined under "Preferences > Displaying messages > Default Character Set" does have an influence how plain/text attachments (and probably other attachments as well?) are being detected and handled. This does confuse me and does not make any sense to me. The warning is simply wrong, and the fallback charset is in no way connected to the Content-Type (or better, it should not).
You're right that charset setting shouldn't change behaviour of that check. But it does because converting (or not converting) the charset can produce invalid content which then is detected as application/octet-stream.
This can be fixed by changing 3rd argument of get_part_content() method to true in line 128 and 130 of steps/mail/get.inc. I'm not sure if this change will have any security implications, but for sure is not the only change we need, because $part->body need to be converted (if needed) later. The value can be also cached, so it's not a simple change and need to be done with care. Open a ticket, please.