report a bug |  advanced search |  statistics |  developer log in/out
Bug #16 special characters can lead to prefix breaking
Submitted: 2011-02-06 03:29 UTC Modified: 2018-01-16 13:50 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: floeff at gmail dot com Assigned:
Status: Open
Mlmmj Version: 1.2.17 OS: Ubuntu 10.04.1 LTS
MTA: Postfix MTA Version: 2.7.0
View Add Comment Developer Edit
You must login as a developer to do anything here. You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
 [2011-02-06 03:29 UTC] floeff at gmail dot com
It seems like that special characters (Chinese?) can lead to prefix breaking as seen in this thread:

Sometimes, the prefix is added again. I cannot check right now if this is a bug in mlmmj or in the sending MUA.


Add a Patch


 [2011-08-12 08:25 UTC] dawan at melix dot net
It's not be the MUA, it happens with BASE64-encoded subjects (that's why some
non-ASCII subjects don't trigger the bug).

The reason is simple, on line 146 of do_all_the_voodoo_here.c (in function
do_all_the_voodoo_here()), a test is done on cleanquotedp(hdrline + 8) but there
is no cleanbase64() anywhere.

I think I'm going to try to write a patch, but this raises another problem: what
about the prefix's charset? The string built by cleanquotedp() is incorrect if
several MIME-words with different charsets are used (it never happens but I'm
sure it is legal), of if the subject resembles the content of a MIME-word but
doesn't have "=?…?=".
Same thing, I would gladly try to write the correct code, but I need to know
what is assumed about the charset of the prefix (is it the one of the locale, or
is it supposed to be translated to a given charset when ./control/prefix is
read, or…).
 [2011-09-06 00:35 UTC] maintainer at mlmmj dot org
I'd love to see a patch for this.

Let's assume the prefix is in utf-8. Listtexts are documented to be in utf-8 (and though it's apparently broken, we will fix it). It seems sensible to do the same with the subject prefix. Please add that assumption to the documentation for the prefix tunable, too.
 [2018-01-16 13:50 UTC] maintainer at mlmmj dot org
See also #68.
Based on the PHP bug tracker.
Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jan 30 01:27:44 2013 UTC