always strip s/mime signatures in incoming emails

This commit is contained in:
Régis Hanol
2016-06-27 22:26:05 +02:00
parent 32b22996d0
commit 376881845c
2 changed files with 8 additions and 1 deletions

View File

@ -429,6 +429,9 @@ module Email
def create_post_with_attachments(options={})
# deal with attachments
@mail.attachments.each do |attachment|
# always strip S/MIME signatures
next if attachment.content_type == "application/pkcs7-mime".freeze
tmp = Tempfile.new("discourse-email-attachment")
begin
# read attachment