From: pdontthink Date: Wed, 21 Jul 2010 19:19:07 +0000 (+0000) Subject: Fix attachment filename decoding (#2994865) X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=117aa0c5efb1d91611d4071ed70f6342be6e8eda;hp=6d9f22dba5d50ff55b8d6811412feedd3e534acf Fix attachment filename decoding (#2994865) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13967 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/doc/ChangeLog b/doc/ChangeLog index 334c5b2d..f2067c8e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -345,8 +345,9 @@ Version 1.5.2 - SVN - Fixed minor vulnerability in Mail Fetch plugin [CVE-2010-1637/TEHTRI-SA-2010-009] - Now properly quote personal part of encoded addresses when replying. - Now fill in default subject when forwarding as attachment (#2936541). - - Fix issues caused by use of PostgreSQL keyword "user" in SquirrelMail's + - Fixed issues caused by use of PostgreSQL keyword "user" in SquirrelMail's default preferences database schema (#2943483). + - Fixed attachment filename decoding problems (#2994865). Version 1.5.1 (branched on 2006-02-12) -------------------------------------- diff --git a/src/compose.php b/src/compose.php index 63970913..ae6a4900 100644 --- a/src/compose.php +++ b/src/compose.php @@ -1063,7 +1063,8 @@ function getAttachments($message, &$composeMessage, $passed_id, $entities, $imap $filename = $message->getFilename(); break; } - $filename = str_replace(' ', ' ', decodeHeader($filename)); +//FIXME: added three args to the following, so as to set the last one to TRUE, to mimick a fix in 1.4.21 (#2994865), but didn't test this (note that in 1.4.21, the 2nd and 3rd args are FALSE, but here in this code, they weren't being specified (thus defaulting to TRUE), so I don't know if that means this code is outdated and should have been changed to FALSE, FALSE or if this code is completely different and the addition of the TRUE for arg #4 is wrong + $filename = str_replace(' ', ' ', decodeHeader($filename, true, true, true)); if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode')) { $filename = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode', $filename);