Ticket #1484565 (closed Bugs: fixed)

Opened 12 months ago

Last modified 7 months ago

bad charsets render message/subject invisible - should assume us-ascii at least

Reported by: memoryhole Owned by: thomasb
Priority: 5 Milestone: 0.1-stable
Component: MIME parsing Version: svn-trunk
Severity: major Keywords:
Cc:

Description

If a message has a bad Content-Type encoding, roundcube gives up on rendering the message entirely. The message shows up in the message list with "(no subject)" as its subject (even though it may have a correctly encoded subject). When you try to view the message, the content of the message is missing.

I can repeatably demonstrate this by taking an ordinary email message with a Content-Type header and modifying it. For example, the following header makes the message unviewable:

Content-Type: TEXT/PLAIN; charset=X-UNKNOWN

If that header is changed to:

Content-Type: TEXT/PLAIN; charset=US-ASCII

Then suddenly it becomes viewable in roundcube again. This behavior is only true of the current SVN; it doesn't happen in 0.1-rc1. In that version of roundcube, messages with unrecognized charsets appear to be assumed to be US-ASCII, and they display well.

Unfortunately, some versions of pine and other webmails (e.g. squirrelmail) spit out these malformed emails.

Attachments

roundcube-iconv-fix.patch (1.0 kB) - added by memoryhole 12 months ago.
A patch that fixes the problem (with charset aliasing to fix typical mis-labelling)

Change History

Changed 12 months ago by thomasb

  • milestone changed from 0.1-rc2 to 0.1.1

In case the charset specification is missing, we have a fallback to ISO-8859-1 but X-UNKNOWN might cause iconv to fail.

Changed 12 months ago by memoryhole

The X-UNKNOWN header is often generated by pine when dealing with messages that were once utf-8 encoded. Squirrelmail has been known to generate the following header:

Content-Type: TEXT/PLAIN; charset=none

The best fallback, at least in the western world, is probably windows-1252 rather than ISO-8859-1 (aka latin1).

Changed 12 months ago by memoryhole

A patch that fixes the problem (with charset aliasing to fix typical mis-labelling)

Changed 11 months ago by thomasb

  • owner set to thomasb
  • status changed from new to assigned
  • milestone changed from 0.1.1 to 0.1-stable

Changed 11 months ago by beni

I encountered a subject problem similar to the above.

The subject line:

Subject: Cron <root@hellforge>    nice -n 19 backup2l -b			# backup

caused roundcube svn to fail render the subject line, it was printed "(no subject)" instead.

I successfully applied the above mentioned patch to roundcube-svn REV 874 (which has main.inc REV 862) some minutes ago. This patch fixes my issue.

Changed 7 months ago by thomasb

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r1032

Note: See TracTickets for help on using tickets.