From: Jean-Philippe Lang Date: Sun, 23 Sep 2018 13:36:30 +0000 (+0000) Subject: redmine:email:read and rdm-mailhandler.rb should use safe_receive instead of receive... X-Git-Tag: 4.0.0~164 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c9640667d13cb8f37a94858acac68c0e6174107d;p=redmine.git redmine:email:read and rdm-mailhandler.rb should use safe_receive instead of receive (#29614). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17508 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/mail_handler_controller.rb b/app/controllers/mail_handler_controller.rb index ccb832e7a..1942ab1b7 100644 --- a/app/controllers/mail_handler_controller.rb +++ b/app/controllers/mail_handler_controller.rb @@ -26,7 +26,7 @@ class MailHandlerController < ActionController::Base def index options = params.dup email = options.delete(:email) - if MailHandler.receive(email, options) + if MailHandler.safe_receive(email, options) head :created else head :unprocessable_entity diff --git a/lib/tasks/email.rake b/lib/tasks/email.rake index 86ef628e8..3c57f1af8 100644 --- a/lib/tasks/email.rake +++ b/lib/tasks/email.rake @@ -26,7 +26,7 @@ END_DESC task :read => :environment do Mailer.with_synched_deliveries do - MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV)) + MailHandler.safe_receive(STDIN.read, MailHandler.extract_options_from_env(ENV)) end end