[RCD] Confusion with attachment warnings again

A.L.E.C alec at alec.pl
Tue Apr 2 12:02:12 CEST 2013

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

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.

Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
Roundcube Webmail Developer  [http://roundcube.net]
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl

More information about the dev mailing list