rpms/squirrelmail/FC-5 squirrelmail-1.4.8-IE-Japanese-download-ugly-hack.patch, NONE, 1.1 config_local.php, 1.2, 1.3 squirrelmail-1.4.6-IE-Japanese-download-ugly-hack.patch, 1.1, NONE squirrelmail-1.4.7-check-mail.ja.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Jan 16 06:41:33 UTC 2007
- Previous message (by thread): rpms/squirrelmail/FC-5 squirrelmail-1.4.8-CVE-2006-6142-draft_composesess.patch, NONE, 1.1 squirrelmail-1.4.8-CVE-2006-6142-mailto.patch, NONE, 1.1 squirrelmail-1.4.8-CVE-2006-6142-mime.php.patch, NONE, 1.1 squirrelmail.spec, 1.39, 1.40
- Next message (by thread): rpms/gzip/devel gzip.spec,1.31,1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: wtogami
Update of /cvs/dist/rpms/squirrelmail/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv23923
Modified Files:
config_local.php
Added Files:
squirrelmail-1.4.8-IE-Japanese-download-ugly-hack.patch
Removed Files:
squirrelmail-1.4.6-IE-Japanese-download-ugly-hack.patch
squirrelmail-1.4.7-check-mail.ja.patch
Log Message:
fix patches
squirrelmail-1.4.8-IE-Japanese-download-ugly-hack.patch:
mime.php | 49 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 36 insertions(+), 13 deletions(-)
--- NEW FILE squirrelmail-1.4.8-IE-Japanese-download-ugly-hack.patch ---
diff -ruNp squirrelmail-1.4.6.org/functions/mime.php squirrelmail-1.4.6/functions/mime.php
--- squirrelmail-1.4.6.org/functions/mime.php 2006-08-15 13:10:40.000000000 +0900
+++ squirrelmail-1.4.6/functions/mime.php 2006-08-15 15:39:53.000000000 +0900
@@ -249,6 +249,7 @@ function translateText(&$body, $wrap_at,
require_once(SM_PATH . 'functions/url_parser.php');
+ $charset = strtolower($charset);
$body_ary = explode("\n", $body);
for ($i=0; $i < count($body_ary); $i++) {
$line = $body_ary[$i];
@@ -312,6 +313,14 @@ function formatBody($imap_stream, $messa
}
$body = '';
+ if (!$charset_converted) {
+ if ($charset == 'iso-2022-jp' || $charset == 'shift_jis' || $charset == 'euc-jp' ||
+ ($squirrelmail_language == 'ja_JP' &&
+ ($charset == 'utf-8' || $charset == '' || $charset == 'us-ascii'))) {
+ $body = $languages['ja_JP']['XTRA_CODE']('decode', $body);
+ $charset_converted = true;
+ }
+ }
$urlmailbox = urlencode($mailbox);
$body_message = getEntity($message, $ent_num);
if (($body_message->header->type0 == 'text') ||
@@ -319,12 +328,15 @@ function formatBody($imap_stream, $messa
$body = mime_fetch_body ($imap_stream, $id, $ent_num);
$body = decodeBody($body, $body_message->header->encoding);
- if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
- function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
- if (mb_detect_encoding($body) != 'ASCII') {
- $body = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $body);
- }
+ $charset_converted = false;
+ if (strtolower($body_message->header->getParameter('charset')) == 'iso-2022-jp' &&
+ isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
+ function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
+ if (mb_detect_encoding($body) != 'ASCII') {
+ $body = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $body);
+ }
}
+
$hookResults = do_hook("message_body", $body);
$body = $hookResults[1];
@@ -584,6 +596,13 @@ function decodeBody($body, $encoding) {
* str_replace("\r\n", "\n", $body); call.
*/
$body = quoted_printable_decode($body);
+
+ if ($squirrelmail_language != 'ja_JP') {
+ while (ereg("=n", $body)) {
+ $body = ereg_replace ("=n", '', $body);
+ }
+ }
+
} elseif ($encoding == 'base64') {
$body = base64_decode($body);
}
@@ -2142,13 +2161,14 @@ function SendDownloadHeaders($type0, $ty
$isIE6plus = true;
}
- if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
- function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
- $filename =
- $languages[$squirrelmail_language]['XTRA_CODE']('downloadfilename', $filename, $HTTP_USER_AGENT);
- } else {
- $filename = ereg_replace('[\\/:\*\?"<>\|;]', '_', str_replace(' ', ' ', $filename));
- }
+ if($squirrelmail_language != 'ja_JP')
+ if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
+ function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
+ $filename =
+ $languages[$squirrelmail_language]['XTRA_CODE']('downloadfilename', $filename, $HTTP_USER_AGENT);
+ } else {
+ $filename = ereg_replace('[\\/:\*\?"<>\|;]', '_', str_replace(' ', ' ', $filename));
+ }
// A Pox on Microsoft and it's Internet Explorer!
//
@@ -2163,7 +2183,10 @@ function SendDownloadHeaders($type0, $ty
// version
//set all the Cache Control Headers for IE
if ($isIE) {
- $filename=rawurlencode($filename);
+ if($squirrelmail_language != 'ja_JP')
+ $filename=rawurlencode($filename);
+ else
+ $filename = mb_convert_encoding($filename,"SJIS");
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);
--- squirrelmail-1.4.6-IE-Japanese-download-ugly-hack.patch DELETED ---
--- squirrelmail-1.4.7-check-mail.ja.patch DELETED ---
- Previous message (by thread): rpms/squirrelmail/FC-5 squirrelmail-1.4.8-CVE-2006-6142-draft_composesess.patch, NONE, 1.1 squirrelmail-1.4.8-CVE-2006-6142-mailto.patch, NONE, 1.1 squirrelmail-1.4.8-CVE-2006-6142-mime.php.patch, NONE, 1.1 squirrelmail.spec, 1.39, 1.40
- Next message (by thread): rpms/gzip/devel gzip.spec,1.31,1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list