From: pdontthink Date: Thu, 14 Apr 2005 11:01:25 +0000 (+0000) Subject: It isn't a workaround X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=593d083d62db29ea010204fbadaf0a35de3f8889;p=squirrelmail.git It isn't a workaround git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9267 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/ChangeLog b/ChangeLog index 31c512c1..113ff692 100644 --- a/ChangeLog +++ b/ChangeLog @@ -309,8 +309,8 @@ Version 1.5.1 -- CVS - If From: field is unset in an email, header object for from field is not correctly set, and generates an error on reply (#1179754). - Add Cancel button to addressbook (#1180565). - - Workaround for Courier IMAP; send mixed messages with multiparts - with nested boundaries that Courier is able to parse + - RFC 2046: Send mixed messages with multipart/alternative nested boundaries + with correct boundary strings Version 1.5.0 - 2 February 2004 ------------------------------- diff --git a/class/deliver/Deliver.class.php b/class/deliver/Deliver.class.php index b05f20cf..9a9bce05 100644 --- a/class/deliver/Deliver.class.php +++ b/class/deliver/Deliver.class.php @@ -77,11 +77,11 @@ class Deliver { if (strpos($boundary,'_part_')) { $boundary = substr($boundary,0,strpos($boundary,'_part_')); - // the next four lines use strrev to reverse any nested boundaries - // as a workaround for Courier-IMAP, which will stop parsing - // when it sees the original outer boundary string and ignore - // our "_part_..." addition to that string. a bug report has been - // made, but in the meantime... + // the next four lines use strrev to reverse any nested boundaries + // because RFC 2046 (5.1.1) says that if a line starts with the outer + // boundary string (doesn't matter what the line ends with), that + // can be considered a match for the outer boundary; thus the nested + // boundary needs to be unique from the outer one // } else if (strpos($boundary,'_trap_')) { $boundary = substr(strrev($boundary),0,strpos(strrev($boundary),'_part_'));