Ticket #1484712 (closed Bugs: fixed)

Opened 11 months ago

Last modified 10 months ago

Roundcube doesn't parse some IMAP charsets properly

Reported by: Gena01 Owned by:
Priority: 5 Milestone: 0.1-stable
Component: Client Scripts Version: 0.1-rc2
Severity: minor Keywords:
Cc:

Description (last modified by thomasb) (diff)

There's a bug that I experienced running against Dovecot in my setup.

[content-type] => text/plain; charset=ANSI_X3.4-1968

header got charset parsed as ANSI because of a bad regexp. It would parse it to ANSI and this is not a valid charset so I would get a missing Subject when viewing e-mails.

It took me a while to track this down, The fix is to edit the regexp in program/lib/imap.inc line 1302 to have updated regexp:

if (preg_match('/charset="?([a-z0-9\-\.\_]+)"?/i', $ctype_add, $regs))
  $result[$id]->charset = $regs[1];

I basically added support for . and _ in charset. With this patch I am getting the messages displayed properly now.

Change History

Changed 11 months ago by thomasb

  • severity changed from major to minor
  • description modified (diff)
  • milestone set to 0.1-stable

Changed 10 months ago by till

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.