You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently received a mail with the following structure:
From: [email protected]
MIME-Version: 1.0
Content-type: multipart/report; boundary="======11647==82899======"; report-type="spam-notification"
Subject: Important
This is a multi-part message in MIME format...
--======11647==82899======
Content-Type: text/plain; charset="ISO-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
--======11647==82899======
Content-Type: message/rfc822
Content-Disposition: attachment
Content-Transfer-Encoding: binary
--======11647==82899======--
After polling, sup crashed on me:
--- NoMethodError from thread: poll after loading inbox
private method `select' called for nil:NilClass
/usr/local/src/sup/lib/sup/message.rb:338:in `indexable_chunks'
/usr/local/src/sup/lib/sup/message.rb:334:in `indexable_body'
/usr/local/src/sup/lib/sup/index.rb:751:in `index_message_static'
/usr/local/src/sup/lib/sup/index.rb:714:in `sync_message'
/usr/local/src/sup/lib/sup/util.rb:649:in `method_missing'
/usr/local/src/sup/lib/sup/poll.rb:215:in `block in poll_from'
/usr/local/src/sup/lib/sup/maildir.rb:150:in `block in poll'
/usr/local/src/sup/lib/sup/maildir.rb:149:in `each'
/usr/local/src/sup/lib/sup/maildir.rb:149:in `each_with_index'
/usr/local/src/sup/lib/sup/maildir.rb:149:in `poll'
/usr/local/src/sup/lib/sup/poll.rb:201:in `poll_from'
/usr/local/src/sup/lib/sup/poll.rb:146:in `block (2 levels) in do_poll'
/usr/local/src/sup/lib/sup/poll.rb:136:in `each'
/usr/local/src/sup/lib/sup/poll.rb:136:in `block in do_poll'
:10:in `synchronize'
/usr/local/src/sup/lib/sup/poll.rb:135:in `do_poll'
/usr/local/src/sup/lib/sup/util.rb:649:in `method_missing'
/usr/local/src/sup/lib/sup/modes/poll_mode.rb:15:in `poll'
/usr/local/src/sup/lib/sup/poll.rb:58:in `poll_with_sources'
/usr/local/src/sup/lib/sup/poll.rb:94:in `poll'
/usr/local/src/sup/lib/sup/util.rb:649:in `method_missing'
bin/sup:220:in `block (2 levels) in '
/usr/local/src/sup/lib/sup.rb:87:in `block in reporting_thread'
I tracked this down to the inner Content-Transfer-Encoding: binary header, which sup considers invalid, leading to a RMail::EncodingUnsupportedError in message_to_chunks() (and apparently a nil chunks somewhere in the message parsing, which I didn't track down completely). A quick patch in message.rb allowed this particular message to be added correctly, but the problem persists with really invalid Content-Transfer-Encodings. A minimal message to demonstrate this is the following:
Thanks for your detailed report and example emails. It would certainly be easier to fix after Rmail-to-Mail-migration (#127) (which is not ready). But the problem, I think, is in Sup not ending up with an empty array [] and rather a nil. If there is no text/lines for the chunk it should be displayed as an attachment in the thread-view.
Could you test #210, I noticed that with a new debug message a chunks array would not be returned when a message could not be loaded. Your test messages have been added to the test-suite.
I recently received a mail with the following structure:
After polling, sup crashed on me:
I tracked this down to the inner Content-Transfer-Encoding: binary header, which sup considers invalid, leading to a RMail::EncodingUnsupportedError in message_to_chunks() (and apparently a nil chunks somewhere in the message parsing, which I didn't track down completely). A quick patch in message.rb allowed this particular message to be added correctly, but the problem persists with really invalid Content-Transfer-Encodings. A minimal message to demonstrate this is the following:
The text was updated successfully, but these errors were encountered: