pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/squirrelmail Add two small fix:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7441310c2b8c
branches:  trunk
changeset: 399836:7441310c2b8c
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Oct 04 01:27:15 2009 +0000

description:
Add two small fix:

* Use case ignore match for detecting encoded header.  This is
  language independent problem.
* Improve handling of file name of attachment in Japanese environment.

These fixes make squirrelmail usable after remove of japaneses patch.

Bump PKGREVISION.

diffstat:

 mail/squirrelmail/Makefile         |   4 ++--
 mail/squirrelmail/distinfo         |   4 +++-
 mail/squirrelmail/patches/patch-ab |  27 +++++++++++++++++++++++++++
 mail/squirrelmail/patches/patch-ai |  18 ++++++++++++++++++
 4 files changed, 50 insertions(+), 3 deletions(-)

diffs (80 lines):

diff -r c5dd08256b3a -r 7441310c2b8c mail/squirrelmail/Makefile
--- a/mail/squirrelmail/Makefile        Sat Oct 03 18:02:32 2009 +0000
+++ b/mail/squirrelmail/Makefile        Sun Oct 04 01:27:15 2009 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.109 2009/09/29 13:30:54 taca Exp $
+# $NetBSD: Makefile,v 1.110 2009/10/04 01:27:15 taca Exp $
 
 DISTNAME=      squirrelmail-1.4.20-RC2
 PKGNAME=       ${DISTNAME:S/-RC2/rc2/}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    mail www
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=squirrelmail/}
 EXTRACT_SUFX=  .tar.bz2
diff -r c5dd08256b3a -r 7441310c2b8c mail/squirrelmail/distinfo
--- a/mail/squirrelmail/distinfo        Sat Oct 03 18:02:32 2009 +0000
+++ b/mail/squirrelmail/distinfo        Sun Oct 04 01:27:15 2009 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.55 2009/08/26 12:47:17 tron Exp $
+$NetBSD: distinfo,v 1.56 2009/10/04 01:27:15 taca Exp $
 
 SHA1 (squirrelmail-1.4.20-RC2.tar.bz2) = f1cdccfdd17d8974adc0b79aba44b62f98f78f64
 RMD160 (squirrelmail-1.4.20-RC2.tar.bz2) = f736e33af6f7b5a4c49f96968ed3fdeb2d42f06f
 Size (squirrelmail-1.4.20-RC2.tar.bz2) = 516825 bytes
 SHA1 (patch-aa) = 4c5556c804c1b728eec87322272abb06edcfcc2a
+SHA1 (patch-ab) = 503bef625388a3224ad6f54aa332190e7440dde3
+SHA1 (patch-ai) = 701fdbc84afde5f8e255af13ba0e44469343e17c
diff -r c5dd08256b3a -r 7441310c2b8c mail/squirrelmail/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/squirrelmail/patches/patch-ab        Sun Oct 04 01:27:15 2009 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-ab,v 1.14 2009/10/04 01:27:15 taca Exp $
+
+* Use case ignore match for detecting encoded word.
+* Fix encoding problem of attached filenames; don't convert encoding here.
+
+--- functions/i18n.php.orig    2009-07-29 11:21:06.000000000 +0900
++++ functions/i18n.php
+@@ -675,18 +675,11 @@ function japanese_charset_xtra() {
+             break;
+         case 'decodeheader':
+             $ret = str_replace("\t", "", $ret);
+-            if (preg_match('/=\?([^?]+)\?(q|b)\?([^?]+)\?=/', $ret))
++            if (preg_match('/=\?([^?]*)\?(Q|B)\?([^?]*)\?=/Ui', $ret))
+                 $ret = @mb_decode_mimeheader($ret);
+             $ret = @mb_convert_encoding($ret, 'EUC-JP', 'AUTO');
+             break;
+         case 'downloadfilename':
+-            $useragent = func_get_arg(2);
+-            if (strstr($useragent, 'Windows') !== false ||
+-                strstr($useragent, 'Mac_') !== false) {
+-                $ret = mb_convert_encoding($ret, 'SJIS', 'AUTO');
+-            } else {
+-                $ret = mb_convert_encoding($ret, 'EUC-JP', 'AUTO');
+-}
+             break;
+         case 'wordwrap':
+             $no_begin = "\x21\x25\x29\x2c\x2e\x3a\x3b\x3f\x5d\x7d\xa1\xf1\xa1\xeb\xa1" .
diff -r c5dd08256b3a -r 7441310c2b8c mail/squirrelmail/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/squirrelmail/patches/patch-ai        Sun Oct 04 01:27:15 2009 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-ai,v 1.1 2009/10/04 01:27:15 taca Exp $
+
+* Fix encoding problem of attached filenames; convert to Shift_JIS when
+  using Internet Explore in Japanese environment, sigh.
+
+--- functions/mime.php.orig    2009-07-31 19:12:46.000000000 +0900
++++ functions/mime.php
+@@ -2563,6 +2563,10 @@ function SendDownloadHeaders($type0, $ty
+     //set all the Cache Control Headers for IE
+     if ($isIE) {
+         $filename=rawurlencode($filename);
++        if ($squirrelmail_language == 'ja_JP') {
++            $filename = rawurldecode($filename);
++            $filename = mb_convert_encoding($filename, 'SJIS', 'AUTO');
++        }
+         header ("Pragma: public");
+         header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); // HTTP/1.1
+         header ("Cache-Control: post-check=0, pre-check=0", false);



Home | Main Index | Thread Index | Old Index