Urgent base64 decoding bug - affects virus detection
"Todd Richmond" <[email protected]> Fri, 23 Jul 2004 01:51:34 -0700
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <006f01c47092$42a59320$0200a8c0@viper> |
MyDoom.n has tickled a bug in Mail::Box base64 decoding that emits corrupted
data. Msgs with that virus (and possibly other mail) use non-standard line
breaks in the base64 data. This causes file attachments to be truncated
which prevents virus scanners from detecting a virus.
The fix is to modify Mail/Message/TransferEnc/Base64.pm to decode the body
as one chunck, not individual lines
in "sub _decode_from_lines($)" change
join '', map { decode_base64($_) } $body->lines;
to
decode_base64($body->string);
decode_from_file() requires a similar patch.
Quoted Printable and possibly other transfer encodings have the same issue
and should have similar fixes
Thanks,
Todd