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

Mail attachment collector: Error on mails without attachment file name #1538

Closed
ghost opened this issue May 15, 2020 · 2 comments
Closed

Mail attachment collector: Error on mails without attachment file name #1538

ghost opened this issue May 15, 2020 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior component: bots good first issue Indicates a good issue for first-time contributors
Milestone

Comments

@ghost
Copy link

ghost commented May 15, 2020

imbox 0.9.6

branch develop

mail-collector: Bot has found a problem.
Traceback (most recent call last):
  File "/home/sebastianw/intelmq/intelmq/lib/bot.py", line 267, in start
    self.process()
  File "/home/sebastianw/intelmq/intelmq/bots/collectors/mail/lib.py", line 53, in process
    if self.process_message(uid, message):
  File "/home/sebastianw/intelmq/intelmq/bots/collectors/mail/collector_mail_attach.py", line 30, in process_message
    attach_filename = attach['filename']
KeyError: 'filename'
@ghost ghost added bug Indicates an unexpected problem or unintended behavior component: bots labels May 15, 2020
@ghost ghost added this to the 2.1.3 milestone May 15, 2020
@ghost ghost self-assigned this May 15, 2020
@ghost
Copy link
Author

ghost commented May 15, 2020

attachments without filenames are just content parts which are not attachments itself

@ghost ghost added the good first issue Indicates a good issue for first-time contributors label May 15, 2020
@ghost
Copy link
Author

ghost commented May 15, 2020

For the tests: attach could be {'content-type': 'multipart/mixed', 'size': 2, 'content': <_io.BytesIO object at 0x7f05fed7e5c8>}

@ghost ghost changed the title Mail attachment collector: Error on mails without attachment Mail attachment collector: Error on mails without attachment file name May 25, 2020
@ghost ghost closed this as completed in ae1ad90 May 26, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: bots good first issue Indicates a good issue for first-time contributors
Projects
None yet
Development

No branches or pull requests

0 participants