Parse attachment filenames when missing RFC-required quotes, for certain content-types?
- Dominant language
- Ruby
- Stars
- 3.7k
- Forks
- 934
- PR merge metrics
- No merged PRs in 30d
Description
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:
```ruby
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"
```
Contributor guide
Research direction
Start with the Mail::Part.new examples and the filename entry point shown in the issue, comparing behavior for content types with and without a period. Done means the RFC-encoded attachment filename is parsed when quotes are missing in the failing content-type case, while the provided examples continue to return the expected filename.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100