practical-python-org / ZorakBot

The house bot of Practical Python
MIT License
17 stars 18 forks source link

BUG - Spam filter should not use image filenames #439

Open Crambor opened 4 months ago

Crambor commented 4 months ago

Many screenshot tools, or simply copied images into the discord textbox, will have the exact same image filename as a result. We currently use filenames for spam detection which can lead to false positives, with users being unnecessarily quarantined.

The below code should be modified to use something like an image checksum for attachment comparison: https://github.com/practical-python-org/ZorakBot/blob/fd16e9d3b8454673dcf0b195f34f89b45b6f14d1/src/zorak/cogs/admin/admin_automod_spam_messages.py#L44-L57