mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: don't strip eml attachments from received emails
This commit is contained in:
@@ -882,7 +882,7 @@ module Email
|
||||
def attachments
|
||||
# strip blacklisted attachments (mostly signatures)
|
||||
@attachments ||= begin
|
||||
attachments = @mail.attachments.select { |attachment| is_whitelisted_attachment?(attachment) }
|
||||
attachments = @mail.parts.select { |part| part.attachment? && is_whitelisted_attachment?(part) }
|
||||
attachments << @mail if @mail.attachment? && is_whitelisted_attachment?(@mail)
|
||||
attachments
|
||||
end
|
||||
|
Reference in New Issue
Block a user