Opened 4 years ago
Closed 4 years ago
#1485790 closed Bugs (duplicate)
Broken message encoding is converted in header, but not in $struct
| Reported by: | bugger | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2.2 |
| Component: | Database | Version: | 0.1.1 |
| Severity: | normal | Keywords: | subject, mime, utf-8, postgres, utf8 |
| Cc: | roundcube.9.n1@… |
Description
How to reproduce: Send yourself an email that uses non-ASCII, non-MIME encoded special characters in the Subject line. German umlauts in latin1 encoding for example.
You will get errors like these in your postgres logfile:
ERROR: invalid byte sequence for encoding "UTF8": 0xe4f6fc
These are caused in the function:
function add_message_cache($key, $index, $headers, $struct=null)
in the INSERT query (and possibly others). The reason is that while the subject line will go through decode_header (which will strip/replace non-utf8 sequences), serialize($struct) will still carry, for example, latin1 encoded characters.
If I'm not mistaken, this should break caching for messages with subject lines like these.
Version affected: 0.1~rc2-6ubuntu0.1 - maybe this hasn't been fixed in the meantime.
Workaround: Disable caching.
Change History (1)
comment:1 Changed 4 years ago by alec
- Milestone set to 0.2.2
- Resolution set to duplicate
- Status changed from new to closed

Duplicate of #1484608