From cc846cb49d8e99e0ca183cef8c73df8b8af6b39b Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Fri, 25 Apr 2014 09:02:12 +0100 Subject: Fix for badly-formed content-disposition header. Taken from https://github.com/mikel/mail/pull/602 --- spec/lib/mail_handler/mail_handler_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/lib/mail_handler/mail_handler_spec.rb') diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb index 49a65dade..ffc40ced9 100644 --- a/spec/lib/mail_handler/mail_handler_spec.rb +++ b/spec/lib/mail_handler/mail_handler_spec.rb @@ -22,6 +22,11 @@ describe 'when creating a mail object from raw data' do mail.multipart?.should == true end + it "should not fail on invalid byte sequence in content-disposition header", :focus => true do + part = Mail::Part.new("Content-Disposition: inline; filename=a\xB8z\r\n\r\nThis is the body text.") + lambda { part.inline? }.should_not raise_error + end + it 'should parse multiple to addresses with unqoted display names' do mail = get_fixture_mail('multiple-unquoted-display-names.email') mail.to.should == ["request-66666-caa77777@whatdotheyknow.com", "foi@example.com"] -- cgit v1.2.3