16 Sep 2009 02:12
Proposed change to encodeHeader()
Paul Lesniewski <paul <at> squirrelmail.org>
2009-09-16 00:12:29 GMT
2009-09-16 00:12:29 GMT
All,
Sorry for the cross-post (to the devel list), but I wanted to catch
the attention of anyone using different charsets with SquirrelMail and
see if they had any feedback on this issue. At the least, maybe
people here would be willing to test the attached patch and see if it
causes any issues. Thanks.
I was looking into a problem where encoded FROM headers weren't
being quoted, which causes problems when replying if they have a comma
in them. US-ASCII (non-encoded) FROM headers are always encased in
quotes for this very reason I believe (in case a comma is found
within).
It depends on the charset/encoding in question (any language can
provide its own encoding via XTRA_CODE in the language setup (I didn't
check those routines), and other multibyte character sets use the
encodeHeaderBase64() function), but if the code in encodeHeader() is
used, quotes around the full name part of the email address can cause
problems because they are not always encoded. I didn't dissect the
code in this function (which is why I'm asking), but found that adding
a simple test for quotes "fixes" this issue.
--- functions/mime.php (revision 13833)
+++ functions/mime.php (working copy)
<at> <at> -789,6 +789,7 <at> <at>
for($i = 0; $i < $j; ++$i) {
switch($string{$i})
{
+ case '"':
(Continue reading)
RSS Feed