Skip to content

Commit

Permalink
Merge pull request #951 from passiv/master
Browse files Browse the repository at this point in the history
Prevent filename collisions when processing attachments
  • Loading branch information
gwasser committed Mar 8, 2021
2 parents 406207f + 9f99eb5 commit 0bdaa87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helpdesk/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ def object_from_message(message, queue, logger):
if not name:
ext = mimetypes.guess_extension(part.get_content_type())
name = "part-%i%s" % (counter, ext)
else:
name = ("part-%i_" % counter) + name

# FIXME: this code gets the paylods, then does something with it and then completely ignores it
# writing the part.get_payload(decode=True) instead; and then the payload variable is
Expand Down

0 comments on commit 0bdaa87

Please sign in to comment.