Subject: [sup-devel] [issue116] TypeError when trying to send a PGP signed email with attachments

From: Sascha Silbe <[email-masked]>
Date: Mon, 16 Aug 2010 21:33:45 +0000

New submission from Sascha Silbe <[email-masked]>:

When trying to send an email that is going to get PGP signed and has two attachments (haven't tried with just one), the following exception occurs:

--- TypeError from thread: main
can't convert Array into String
./lib/sup/modes/edit-message-mode.rb:407:in `pack'
./lib/sup/modes/edit-message-mode.rb:407:in `build_message'
./lib/sup/modes/edit-message-mode.rb:355:in `send_message'
./lib/sup/mode.rb:59:in `send'
./lib/sup/mode.rb:59:in `handle_input'
./lib/sup/buffer.rb:277:in `handle_input'
bin/sup:260

The code in question is:

402)     ## do whatever crypto transformation is necessary
403)     if @crypto_selector && @crypto_selector.val != :none
404)       from_email = Person.from_address(@header["From"]).email
405)       to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| Person.from_addres
406)       m.header["Content-Transfer-Encoding"] = 'base64'
407)       m.body = [m.body].pack('m')
408) 
409)       m = CryptoManager.send @crypto_selector.val, from_email, to_email, m
410)     end

This is with local changes (so the line numbers won't match), but I've checked this particular piece of code is the same on mainline/master.

----------
keyword: crypto, encoding
messages: 269
nosy: sascha_silbe
priority: bug
ruby_version: 1.8
status: unread
sup_version: git commit 9be79c3
title: TypeError when trying to send a PGP signed email with attachments

_________________________________________
Sup issue tracker <[email-masked]>
<http://masanjin.net/sup-bugs/issue116>
_________________________________________
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel