Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11597 (new defect)

Opened 1 month ago

ActionMailer crashes on some malformed emails

Reported by: wesha Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionMailer Version: edge
Severity: normal Keywords:
Cc:

Description

Stack trace:


vendor/gems/actionmailer-1.3.6/lib/action_mailer/vendor/tmail/attachments.rb:15:in `attachment?' vendor/gems/actionmailer-1.3.6/lib/action_mailer/vendor/tmail/attachments.rb:21:in `attachments' vendor/gems/actionmailer-1.3.6/lib/action_mailer/vendor/tmail/attachments.rb:20:in `attachments'


The problem still remains in 2.0.2:


def attachment?(part)

(partcontent-disposition? && partcontent-disposition?.disposition == "attachment") part.headercontent-type?.main_type != "text"

end


Probably should be:


def attachment?(part)

(partcontent-disposition? && partcontent-disposition?.disposition == "attachment") (part.headercontent-type? && part.headercontent-type?.main_type != "text")

end