mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 13:27:40 +02:00
Empty email attachments are imported to Redmine, creating broken DB records (#27885).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@17147 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -296,6 +296,7 @@ class MailHandler < ActionMailer::Base
|
||||
if email.attachments && email.attachments.any?
|
||||
email.attachments.each do |attachment|
|
||||
next unless accept_attachment?(attachment)
|
||||
next unless attachment.body.decoded.size > 0
|
||||
obj.attachments << Attachment.create(:container => obj,
|
||||
:file => attachment.body.decoded,
|
||||
:filename => attachment.filename,
|
||||
|
||||
Reference in New Issue
Block a user