From: pdontthink Date: Fri, 17 Dec 2010 21:41:39 +0000 (+0000) Subject: Force the addition of a file suffix to attachments that lack a filename (helps forwar... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ace33b58d2b4d8266e1dc66d1bbe54074eb01a70;p=squirrelmail.git Force the addition of a file suffix to attachments that lack a filename (helps forwarded messages avoid spam filters) (Thanks to Petr Kletecka) (#3139004) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14080 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/mime/Message.class.php b/class/mime/Message.class.php index cd49dea7..b6d0f221 100644 --- a/class/mime/Message.class.php +++ b/class/mime/Message.class.php @@ -161,9 +161,9 @@ class Message { $name = $header->getParameter('name'); if(!trim($name)) { if (!trim( $header->id )) { - $filename = 'untitled-[' . $this->entity_id . ']' ; + $filename = 'untitled-[' . $this->entity_id . ']' . '.' . strtolower($header->type1); } else { - $filename = 'cid: ' . $header->id; + $filename = 'cid: ' . $header->id . '.' . strtolower($header->type1); } } else { $filename = $name; @@ -178,9 +178,9 @@ class Message { $filename = $header->getParameter('name'); if (!trim($filename)) { if (!trim( $header->id )) { - $filename = 'untitled-[' . $this->entity_id . ']' ; + $filename = 'untitled-[' . $this->entity_id . ']' . '.' . strtolower($header->type1); } else { - $filename = 'cid: ' . $header->id; + $filename = 'cid: ' . $header->id . '.' . strtolower($header->type1); } } } diff --git a/doc/ChangeLog b/doc/ChangeLog index 42c638df..23300a5b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -353,6 +353,9 @@ Version 1.5.2 - SVN - Now allow multiple plugins to handle (add links for) a single attachment MIME type. - Fixed sqauth_read_password() for plugins on the login_verified hook. + - Forced addition of a file suffix to attachments that lack a filename + (helps forwarded messages avoid spam filters) (Thanks to Petr + Kletecka) (#3139004). Version 1.5.1 (branched on 2006-02-12) --------------------------------------