[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-devel] [issue105] crash exception when viewing attachment with /s in filename



New submission from Ã?lvaro Herrera <alvherre@alvh.no-ip.org>:

Got this exception today:

--- RuntimeError from thread: main
cannot generate tempfile `/home/alvherre/tmp/13416-9-/pgpatches/regexp'
/usr/lib/ruby/1.8/tempfile.rb:52:in `initialize'
/usr/lib/ruby/1.8/sup/message-chunks.rb:152:in `new'
/usr/lib/ruby/1.8/sup/message-chunks.rb:152:in `write_to_disk'
/usr/lib/ruby/1.8/sup/message-chunks.rb:145:in `view!'
/usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:839:in `view'
/usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:341:in `activate_chunk'
/usr/lib/ruby/1.8/sup/mode.rb:59:in `send'
/usr/lib/ruby/1.8/sup/mode.rb:59:in `handle_input'
/usr/lib/ruby/1.8/sup/buffer.rb:279:in `handle_input'
/usr/bin/sup-mail:277

The problem is that the attachment contains forward slashes in the filename, and 
this makes tempfile to raise an exception because it's expecting the directory 
to exist.

Example message: http://archives.postgresql.org/msgtxt.php?
id=201005290201.o4T21bk04708@momjian.us

The attached patch (to 0.11) fixes the problem.

----------
files: msgchunks.patch
messages: 240
nosy: alvherre
priority: bug
ruby_version: 1.8
status: unread
sup_version: 0.11
title: crash exception when viewing attachment with /s in filename

_________________________________________
Sup issue tracker <sup-bugs@masanjin.net>
<http://masanjin.net/sup-bugs/issue105>
_________________________________________

Attachment: msgchunks.patch
Description: Binary data

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel