Parse attachment filenames when missing RFC-required quotes, for certain content-types?
pdg137 opened this issue · comments
This is a continuation of #1213 which seemed to have been fixed in 2.8.1. On this version it still seems to fail in some cases, specifically if the content-type contains a period:
irb(main):001> require 'mail'
true
irb(main):002> Mail::Part.new('Content-Type: text/plain; name==?utf-8?B?dGVzdC50eHQ=?=').filename
"test.txt"
irb(main):003> Mail::Part.new('Content-Type: text/pla.in; name==?utf-8?B?dGVzdC50eHQ=?=').filename
nil
irb(main):004> Mail::Part.new('Content-Type: text/pla.in; name="=?utf-8?B?dGVzdC50eHQ=?="').filename
"test.txt"