-
-
Couldn't load subscription status.
- Fork 731
Open
Labels
a: filtersRelated to message filters: (antimalware, antispam, filtering, token_remover)Related to message filters: (antimalware, antispam, filtering, token_remover)l: 0 - beginnert: bugSomething isn't workingSomething isn't working
Description
Attachment.content_type can be None, but there are some places where we assume it is a string:
bot/bot/exts/filtering/filtering.py
Line 238 in f0e4d45
for a in msg.attachments if "charset" in a.content_type if message.author.bot or not any("charset" in a.content_type for a in message.attachments): if "charset" in f.content_type
This has come up in production BOT-3ZJ, BOT-3ZH, and BOT-42E.
I assume the fix is as simple as ignoring None values, but I haven't looked into the code here.
Metadata
Metadata
Assignees
Labels
a: filtersRelated to message filters: (antimalware, antispam, filtering, token_remover)Related to message filters: (antimalware, antispam, filtering, token_remover)l: 0 - beginnert: bugSomething isn't workingSomething isn't working