Re: Problems forwarding attachments with iso-8859-1 encoded filenames

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

 




Helge Milde wrote:
> 
> Hi!
> 
> With my current setup, when I forward mails with attachments that have
> iso-8859-1 encoded names, the attachments aren't sent (only the email
> body).
> 
> While viewing the original message, the attachment names are shown
> correctly (norwegian letters are working), but after pressing "Forward"
> (which leads to compose.php), they are shown wrong (norwegian letters gets
> replaced with '�' (\xfffd). I guess somewhere in the code, it gets
> converted to utf-8. After pressing "Send", I can see that the attachments
> aren't sent.
> 
> I've found out exactly where squirrelmail decides to trash the
> attachments, it's in src/compose.php at line 370:
> 
> if (!empty($attachments)) {
>      $attachments = unserialize($attachments); // line 370
>      if (!empty($attachments) && is_array($attachments))
>          $composeMessage->entities = $attachments;
> }
> 
> $attachments comes from a hidden field in the previous step (composing of
> the forwarded email), which contains a hidden field with the serialized
> version of the attachments with the invalid names. A small test that
> changes the serialized output to make room for two extra bytes on the
> invalid filenames (i.e. changing s:36 to s:38 manually) makes squirrelmail
> _not_ ditch the attachments on line 370. I know this is probably
> irrelevant, since it seems to be incorrectly encoded to utf-8 before being
> serialized anyway.
> 
> Is this a problem with my setup, or squirrelmail's code?
> The filename is clearly marked as being encoded in iso-8859-1 in the
> original email:
> 
> ------=_NextPart_000_0010_01CB0C02.CA280780
> Content-Type: application/pdf;
>      name="=?iso-8859-1?Q?Skatteetaten_moms_p=E5_ishall-leie.pdf?="
> 
> .. which makes me think something isn't handled correctly by sqiurrelmail,
> but I got a headache trying to find that out myself, so I would love if
> someone more familiar with the code base could take a look :)
> 
> Some info:
>>SquirrelMail version: 1.4.19 (NutsMail 3.3)
>>PHP version: 5.2.6
>>Apache: apache2-mpm-itk 2.2.6-02-1+lenny2+b2
>>OS: Debian 5.0 lenny
>>$squirrelmail_default_language = 'nb_NO'; (utf-8)
> 

Test your PHP settings (http://www.squirrelmail.org/wiki/TestPHPSettings)
and show all local mbstring and session extension setting values.

Show changes made by Nutsmail (you have such right as long as you don't
include copyrighted theme files) or try to reproduce same problem in
standard SquirrelMail 1.4.20 setup.

PHP5 is from libapache2-mod-php5 or from php5-cgi package?

Do you have some proxy in front of real web service or use mod_rewrite hacks
in your setup?

-- 
Tomas
-- 
View this message in context: http://old.nabble.com/Problems-forwarding-attachments-with-iso-8859-1-encoded-filenames-tp28902606p28913606.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users



[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux