summaryrefslogtreecommitdiffstats
path: root/app/models/mail_handler.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-03-20 01:36:44 +0000
committerGo MAEDA <maeda@farend.jp>2019-03-20 01:36:44 +0000
commit606e75d12d30644d15732f8fbbb61041c2abde3b (patch)
tree7cb4fd47c97bfa77f9212dd36bea883d25def70a /app/models/mail_handler.rb
parent26509e7f4c6dae94baf291b95d46eb6ec8ebca0b (diff)
downloadredmine-606e75d12d30644d15732f8fbbb61041c2abde3b.tar.gz
redmine-606e75d12d30644d15732f8fbbb61041c2abde3b.zip
Use #b shortcut instead of #force_encoding (#31059).
Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@17992 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mail_handler.rb')
-rwxr-xr-xapp/models/mail_handler.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 01a04e924..52faef135 100755
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -43,10 +43,8 @@ class MailHandler < ActionMailer::Base
options[:no_notification] = (options[:no_notification].to_s == '1')
options[:no_permission_check] = (options[:no_permission_check].to_s == '1')
- raw_mail.force_encoding('ASCII-8BIT')
-
ActiveSupport::Notifications.instrument("receive.action_mailer") do |payload|
- mail = Mail.new(raw_mail)
+ mail = Mail.new(raw_mail.b)
set_payload_for_mail(payload, mail)
new.receive(mail, options)
end