mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-03-12 14:41:40 -05:00
- Some email clients send inline attachments using the `multipart/related` Mime-Type and enmime collects these in the `Envelope.OtherParts` list; until now only Envelope.Attachments and Envelope.Inline were considered while parsing incoming mail. - As some email clients send attachments without filename, especially in the multipart/related case, this PR implements `constructFilename`, which guesses the filename based on the ContentType. How the issue was disovered: I implemented an otherwise unrelated application written in go that parses emails with enmime just like Forgejo does. I noticed that in a few occasions that system would fail to detect all attachments. Investigating this issue led me to realize the above described issue. After implementing a fix for that application, I looked through the Forgejo email parsing code and discovered the same problem. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7136 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: christopher-besch <mail@chris-besch.com> Co-committed-by: christopher-besch <mail@chris-besch.com> |
||
---|---|---|
.. | ||
incoming | ||
token | ||
mail.go | ||
mail_admin_new_user.go | ||
mail_admin_new_user_test.go | ||
mail_auth_test.go | ||
mail_comment.go | ||
mail_issue.go | ||
mail_release.go | ||
mail_repo.go | ||
mail_team_invite.go | ||
mail_test.go | ||
mailer.go | ||
mailer_test.go | ||
main_test.go | ||
notify.go |