Bug#680458: squirrelmail: Q-encoded header issue
Package: squirrelmail Version: 2:1.4.23~svn20120406-2 Followup-For: Bug #680458 I ran into this issue recently when upgrading to wheezy. Single byte encoded headers are not decoded correctly and not shown on message list. The fix by Michael Tuschik helps me, but it should be updated to current package version. So, I attach the modified patch here. It also could be added on top of debian/patches stack. --- a/functions/strings.php +++ b/functions/strings.php @@ -1504,8 +1504,10 @@ $encoding = $default_charset; } - if (check_php_version(5, 2, 3)) - return htmlspecialchars($string, $flags, $encoding, $double_encode); + if (check_php_version(5, 2, 3)) { + return htmlspecialchars($string, ENT_COMPAT|ENT_HTML401, 'ISO-8859-1', $double_encode); + //return htmlspecialchars($string, $flags, $encoding, $double_encode); + } return htmlspecialchars($string, $flags, $encoding); }
Bug#680458: squirrelmail: Q-encoded header issue
tags 680458 + patch Please take a look at http://squirrelmail.org/ : --- ANNOUNCE: PHP 5.4 Compatibility Dec 01, 2012 by Paul Lesniewski With the recent release of PHP version 5.4, some community members have helped identify some small issues which we've fixed and made available in our daily snapshot packages located on our downloads page. Especially if you use the Mail Fetch plugin and want to upgrade to PHP 5.4, you should download one of our snapshot packages. UPDATE:If you are running SquirrelMail under PHP 5.4, please help test and refine the patches found here [ http://sourceforge.net/tracker/?func=detail&atid=100311&aid=3491925&group_id=311 ]. There is one patch for each of the two SquirrelMail SVN snapshot versions available on our downloads page. --- Thanks, Paul -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#680458: squirrelmail: Q-encoded header issue
Hi all, i can confirm this too. i already reported this under #664895 ... the ticket is closed but the bug is still there. I investigated some time and found the reason: PHP 5.4.0 changed the default behavior of the function "htmlspecialchars" with the parameter "encoding": > If omitted, the default value for this argument is ISO-8859-1 in versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards. I tried to give that function the old value 'ISO-8859-1': --- i18n.php_orig 2012-01-02 01:18:17.0 +0100 +++ i18n.php2012-09-27 22:55:43.0 +0200 @@ -184,7 +184,7 @@ } /* All HTML special characters are 7 bit and can be replaced first */ -if (! $save_html) $string = htmlspecialchars ($string); +if (! $save_html) $string = htmlspecialchars ($string, ENT_COMPAT | ENT_HTML401, 'ISO-8859-1'); $charset = strtolower($charset); set_my_charset(); And , yeeah, i got my german umlauts back to life (showing in the message list). Maybe this helps the SQ developers to fix this issue. Maybe its a bug in PHP? Regards, Michael -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#680458: squirrelmail: Q-encoded header issue
Hi All, Additionally, I have tested the SM with installing from source (squirrelmail-20120706_0200-SVN.stable.tar.bz2), the issue exists there as well. Now I have installed the squirrelmail from squeeze (within a squeeze chroot), the issue disappeared, everything works fine with the above mentioned IMAP server with the same mails. Regards, Misi -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#680458: squirrelmail: Q-encoded header issue
Package: squirrelmail Version: 2:1.4.23~svn20120406-1 Severity: important Dear Maintainer, My fresh install of squirrelmail on my wheezy does not show the sender nor the subject of the mail if it is Q-encoded. Here is a From header example: From: =?iso-8859-2?Q?Bodor_P=E9ter?= Here is a Subject example: Subject: =?iso-8859-2?q?A=28z=29_linux-kezdo_list=E1ra_k=FCld=F6tt_levele?= =?iso-8859-2?q?d_szerkeszt=F5i_enged=E9ly=E9re_v=E1r?= The above mentioned mails show up properly with other mail clients. Regards, Misi -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.15-5-grsec (SMP w/24 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages squirrelmail depends on: ii apache2 2.2.22-9 ii apache2-mpm-prefork [httpd] 2.2.22-9 ii libapache2-mod-php5 5.4.4-2 ii perl 5.14.2-12 ii php5 5.4.4-2 Versions of packages squirrelmail recommends: ii aspell [aspell-bin] 0.60.7~20110707-1 ii ispell3.3.02-5 ii php5-common [php5-mhash] 5.4.4-2 ii squirrelmail-locales 1.4.18-20090526-1 ii squirrelmail-viewashtml 3.8-3 Versions of packages squirrelmail suggests: ii dovecot-imapd [imap-server] 1:2.1.7-2 pn imapproxy ii php-pear 5.4.4-2 pn php5-ldap ii php5-recode 5.4.4-2 ii squirrelmail-decode 1.2-1 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org