Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If multiple attachments have the same filename, only one is forwarded #1559

Closed
jwhitlock opened this issue Feb 19, 2022 · 0 comments · Fixed by #1611
Closed

If multiple attachments have the same filename, only one is forwarded #1559

jwhitlock opened this issue Feb 19, 2022 · 0 comments · Fixed by #1611
Labels
🐛 bug Something isn't working

Comments

@jwhitlock
Copy link
Member

Attachments are indexed in a dictionary by filename:

att_name, att = (
_get_attachment(part)
)
attachments[att_name] = att

If two attachments have the same filename, then the last one "wins".

The filename is optional, so if multiple attachments have no filename, the last one "wins" as well.

We can fix this by changing attachments to a different data structure, such as a list of (filename, data) tuples (or even (filename, mimetype, data)) tuples. We could also start by counting the number of parts in the incoming message versus the outgoing message, to see how significant the issue is.

@say-yawn say-yawn added the 🐛 bug Something isn't working label Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants