Bug 204211 - Attached file name in Japanese is mis-decoded in save sub window on Windows OS
Attached file name in Japanese is mis-decoded in save sub window on Windows OS
Status: CLOSED DUPLICATE of bug 229454
Product: Fedora
Classification: Fedora
Component: squirrelmail (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Martin Bacovsky
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-26 19:48 EDT by Hyde Yamakawa
Modified: 2008-04-04 00:35 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-04 00:35:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Diff file for mime.php (1.72 KB, text/plain)
2006-08-26 19:48 EDT, Hyde Yamakawa
no flags Details
diff of mime.php from 1.4.8-1 to 1.4.8-3 fc5 (15.65 KB, patch)
2007-01-22 18:56 EST, Zing
no flags Details | Diff

  None (edit)
Description Hyde Yamakawa 2006-08-26 19:48:05 EDT
Description of problem:
Attached file name of Japanese charactor is mis-decoded in sub window when try
to save that file on Windows browser. Main window (browser) has no problem.  
(I tried 2000 and XP, both same. Linux  does not have problem)

Version-Release number of selected component (if applicable):
squirrelmail-1.4.8-1.fc5

How reproducible:
100%

Steps to Reproduce:
1.Open e-mail with attached file named using Japanese font by Windows (IE or
Firefox).
2.Click attached file to save.
3.
  
Actual results:
File name mis-decoded in this sub window.

Expected results:
File name should be same as main window

Additional info:
I found the fix in Japanese Squirrelmail forum http://www.squirrelmail.jp/
and it works fine. So I attach a diff file of mime.php. Please investigate it.
Comment 1 Hyde Yamakawa 2006-08-26 19:48:05 EDT
Created attachment 134993 [details]
Diff file for mime.php
Comment 2 Warren Togami 2006-08-30 02:53:20 EDT
http://download.fedora.redhat.com/pub/fedora/linux/core/development/source/SRPMS/squirrelmail-1.4.8-2.fc6.src.rpm
Please rebuild and test this squirrelmail-1.4.6-2.  This is currently what is on
track to be an update in all Fedora and RHEL distros.  Does this satisfy this issue?
Comment 3 Hyde Yamakawa 2006-08-30 22:24:06 EDT
Yes. It works fine!

Thank you.
Comment 4 Tomas 2006-10-08 04:18:02 EDT
squirrelmail-1.4.8-IE-Japanese-download-ugly-hack.patch
----
@@ -312,6 +313,14 @@ function formatBody($imap_stream, $messa
     }

     $body = '';
+    if (!$charset_converted) {
----

Please turn on PHP display_errors on your test install and set PHP
error_reporting to E_ALL. You are using uninitialized variable.
Comment 5 Zing 2007-01-22 15:19:44 EST
After updating squirrelmail to 1.4.8-3.fc5, my logs are being inundated with:

Jan 22 11:52:33 server2 httpd: PHP Notice:  Undefined variable: charset_converte
d in /usr/share/squirrelmail/functions/mime.php on line 316
Jan 22 11:52:33 server2 httpd: PHP Notice:  Undefined variable: charset in /usr/
share/squirrelmail/functions/mime.php on line 317
Jan 22 11:52:33 server2 last message repeated 2 times

Did not see this in 1.4.8-1.
Comment 6 Warren Togami 2007-01-22 16:59:59 EST
Did this part of the code did not change in Fedora's 1.4.8.  Was the 1.4.8-1 you
were using from a different source?
Comment 7 Zing 2007-01-22 18:56:43 EST
Created attachment 146259 [details]
diff of mime.php from 1.4.8-1 to 1.4.8-3  fc5
Comment 8 Zing 2007-01-22 18:57:21 EST
No. I'm using the fedora binary packages from:

http://mirrors.kernel.org/fedora/core/updates/5/

I couldn't wrap my head around what exactly is happening from looking at cvs, so
I manually downloaded the SRPMS from the above for 1.4.8-1 and 1.4.8-3 and they
do show that this code _did_ change from 1.4.8-1 to 1.4.8-3.  attached diff.
Comment 9 Zing 2007-01-24 16:12:50 EST
this $charset_converted locally scoped variable looks like it's from some other
piece of missing code/functionality.  it's nonsensical, unless maybe it was
meant to be declared static, but it isn't as is.

Also, I don't see how $charset would match anything but the empty string in line
317, unless $charset is some magical global php variable.

This patch needs to be pulled and sent upstream, or someone more knowledgeable
than me has to fix it.
Comment 10 Nigel J. Terry 2007-02-07 10:15:26 EST
I have exactly the same problem with 1.4.8-3.fc5:

Notice: Undefined variable: charset_converted 
in /usr/share/squirrelmail/functions/mime.php on line 316

Notice: Undefined variable: charset 
in /usr/share/squirrelmail/functions/mime.php on line 317

Notice: Undefined variable: charset 
in /usr/share/squirrelmail/functions/mime.php on line 317

Notice: Undefined variable: charset 
in /usr/share/squirrelmail/functions/mime.php on line 317

Notice: Undefined variable: squirrelmail_language 
in /usr/share/squirrelmail/functions/mime.php on line 605

Nigel
Comment 11 Carl Davis 2007-02-07 14:55:11 EST
I have squirrelmail-1.4.8-4.fc5

Notice: Undefined variable: charset_converted in
/usr/share/squirrelmail/functions/mime.php on line 316

Notice: Undefined variable: charset in
/usr/share/squirrelmail/functions/mime.php on line 317

Notice: Undefined variable: charset in
/usr/share/squirrelmail/functions/mime.php on line 317

Notice: Undefined variable: charset in
/usr/share/squirrelmail/functions/mime.php on line 317
Comment 12 Carl Davis 2007-02-17 07:47:05 EST
Is there any work around we can use while this is being fixed?
Comment 13 Mattijs Riekerk 2007-02-27 12:24:41 EST
Same on SquirrelMail 1.4.8-4.fc6
Comment 14 Bug Zapper 2008-04-03 23:36:00 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 15 Zing 2008-04-04 00:35:49 EDT

*** This bug has been marked as a duplicate of 229454 ***

Note You need to log in before you can comment on or make changes to this bug.