mirror of
1
Fork 0
forgejo/services
christopher-besch 3de904c963 feat: parse inline attachments for incoming mail (#7136)
- 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>
2025-03-07 17:54:26 +00:00
..
actions Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
agit fix(agit): run full pr checks on force-push 2024-08-12 09:00:41 +02:00
asymkey tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
attachment tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
auth Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
automerge Add branch auto deletion for scheduled PRs 2024-10-31 03:49:15 +01:00
context fix: return 404 for empty repositories (#7003) 2025-02-20 21:50:46 +00:00
contexttest [TESTS] Fix usage of `LoadRepoCommit` 2024-08-26 08:03:48 +02:00
convert feat: add pronoun privacy option (#6773) 2025-02-15 13:07:15 +00:00
cron Use default Git timeout when checking repo health (#33593) 2025-02-25 12:56:32 +01:00
doctor fix: load settings for valid user and email check (#6674) 2025-01-24 12:23:15 +00:00
externalaccount fix: Revert "allow synchronizing user status from OAuth2 login providers (#31572)" 2024-12-12 05:59:06 +01:00
f3 fix: f3: implement the internal references interface 2025-02-28 18:03:49 +01:00
federation feat: access ActivityPub client through interfaces to facilitate mocking in unit tests (#4853) 2024-08-07 05:45:24 +00:00
feed feat: add commit limit for webhook payload (#6797) 2025-02-07 19:26:50 +00:00
forgejo tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
forms feat: add pronoun privacy option (#6773) 2025-02-15 13:07:15 +00:00
gitdiff Fix parentCommit invalid memory address or nil pointer dereference. (#33204) 2025-01-19 11:52:09 +01:00
indexer Update issue indexer after merging a PR (#30715) 2024-05-12 20:03:10 +02:00
issue demilestone should not include milestone (#32923) 2024-12-28 19:24:24 +00:00
lfs Fix `missing signature key` error when pulling Docker images with `SERVE_DIRECT` enabled (#32365) 2024-11-05 09:33:15 +01:00
mailer feat: parse inline attachments for incoming mail (#7136) 2025-03-07 17:54:26 +00:00
markup Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
migrations Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
mirror Fix mirror bug (#33597) 2025-02-25 12:56:32 +01:00
notify Clean up log messages (#30313) 2024-04-15 20:01:35 +02:00
org Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
packages Add composor source field (#33502) 2025-03-04 00:00:09 +01:00
pull Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
release chore: teach `set` module about `iter.Seq` (#6676) 2025-01-24 16:45:46 +00:00
remote Enable `unparam` linter (#31277) 2024-06-16 13:42:58 +02:00
repository Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
secrets Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
shared/automerge create "shared" package to workaround import loop issues 2024-10-31 03:49:14 +01:00
task feat(quota): Quota enforcement 2024-08-02 11:10:34 +02:00
uinotification Penultimate round of `db.DefaultContext` refactor (#27414) 2023-10-11 04:24:07 +00:00
user fix(web): forbid blocked users from reopening issues (#7010) 2025-03-01 12:39:52 +00:00
webhook Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
wiki Show page titles in wiki search results (#6048) 2024-11-24 15:55:34 +01:00