[imp] base64 Error on IMP-CVS

Michael M Slusarz slusarz at bigworm.colorado.edu
Mon Jul 14 14:23:49 PDT 2003


Quoting Vincent Magnin <imp at lx-soft.com>:

| Ok, I got a hack for this bug:
|
| horde/lib/MIME/Part.php: line 1148
|         if ($encoding == 'base64') {
|             //Hack...
|             $temp = implode('', explode("\r", $contents));
|             $temp = implode('', explode("\n", $temp));
|             $temp = implode('', explode(" ", $temp));
|             $temp = chunk_split($temp);
|             $message = base64_decode($temp);
|             unset($temp);
|         } elseif ($encoding == 'quoted-printable') {

The problem is that the message is NOT RFC 821 compliant - it is over 998
characters plus CRLF.  Although I am all for trying to handle malformed
messages as much as possible, this would add an *awful* lot of overhead to
decoding and doesn't seem worth it since it is extremely rare these days to
see a mailer send a malformed message like this.  In fact, I have never
seen a message that has exceeded this 998 character rule before. 
Therefore, this  patch will not be committed.

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the imp mailing list