 |
Bugs: Browse |
Download .csv
[#3702] Corrupted Content-Type: header causes sympa.pl to crash sending text digest
Date: 2008-02-01 03:59 |
Priority: 3 |
Submitted By:
Adam Bernstein (adam12b)
|
Assigned To:
Nobody (None) |
Summary: Corrupted Content-Type: header causes sympa.pl to crash sending text digest |
| Detailed description | The attached file is a digest consisting of a single message with several levels of nested MIME parts, one of which
has the header:
Content-Type: MESSAGE/rfc8227bit
which is probably supposed to have just "rfc822", but has gotten corrupted somehow. The message was,
unsurprisingly, generated at AOL and forwarded one or more times before it hit Sympa. When Sympa 5.3.4 tries to send
out this digest, it dies completely, and when restarted it gives the following report:
Can't call method "head" on an undefined value at /home/sympa/bin/PlainDigest.pm line 169.
So it seems to be having trouble decoding the message to get the From: header, which wouldn't be so bad if it handled
the failure gracefully (eg. by skipping the message), but it doesn't -- it just dies. Sympa 5.1.2 was the same. Obviously
the root problem is a bug at AOL, but something in Sympa or the MIME tools libraries needs to be smarter about handling
corrupted headers like this one, because the world is full of bugs.
| |
|
Followup
| Message |
Date: 2008-02-06 14:16
Sender: David Verdin
This was fixed int the development trunk.
Here is the patch:
http://sourcesup.cru.fr/viewvc/viewvc/trunk/src/PlainDigest.pm?r1=3597&r2=4835
As you can see, we just ignore a malformed message. Indeed, if we don't find a "head" method there, it is because we couldn't extract a valid message from the entity we are working on. There
is not much to do except signaling that a message should have been here. |
Date: 2008-02-05 10:11
Sender: David Verdin
OK.
So it is just a matter of taking care that the head is defined prior to calling the method.
I'll check it. |
Date: 2008-02-04 21:16
Sender: Adam Bernstein
Oh, and here are my Perl module versions:
MIME::Base64 MIME-Base64 OK (3.07 >= 3.03)
MIME::Charset MIME-Charset OK (0.044 >= 0.04.1)
MIME::EncWords MIME-EncWords OK (0.040 >= 0.040)
MIME::Tools MIME-tools OK (5.425 >= 5.423)
Mail::Internet MailTools OK (1.77 >= 1.51)
Regexp::Common Regexp-Common OK (2.120 >= 1.0)
Template Template-ToolkitOK (2.19 >= 1.0)
XML::LibXML XML-LibXML OK (1.65 >= 1.0)
|
Date: 2008-02-04 21:10
Sender: Adam Bernstein
The stderr file contains only the same line reported above -- and this time I reinstalled the stock Sympa before testing, all of my modifications to code and templates gone:
Can't call method "head" on an undefined value at /home/sympa/bin/PlainDigest.pm line 162.
FWIW, this is FreeBSD 6.2, Perl 5.8.8.
|
Date: 2008-02-04 10:36
Sender: David Verdin
Hi,
I couldn't reproduce this problem with our current development version.
I used your message and Sympa didn't crash.
What did you find int the {#pid}.stderr file in your tmp spool (where {#pid} is the process id of the Sympa that died)?
This contain, at the end, the last error message before Sympa dies. |
Date: 2008-02-01 04:03
Sender: Adam Bernstein
Oh, I forgot to say, the line numbers in my PlainDigest.pm are slightly different than yours because of some minor customizations further up in the file. The "line 169" referred to in the
error message is the *final* line of this snippet, whatever line number that is for you:
sub _do_message {
my $topent = shift;
my $msgent = $topent->parts(0);
my $wdecode = new MIME::WordDecoder::ISO_8859 (1);
my $from = $msgent->head->get('From');
| |
|
Attached Files:
| Name |
Download |
| adamtest@dev.electricembers.net |
Download |
|
|
Changes:
| Field |
Old Value |
Date |
By |
| close_date | 2008-02-06 14:16 | 2008-02-06 14:16 | david.verdin |
| status_id | Open | 2008-02-06 14:16 | david.verdin |
| File Added | 463: adamtest@dev.electricembers.net | 2008-02-01 03:59 | adam12b | |
|
|
 |