From c9640667d13cb8f37a94858acac68c0e6174107d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Sep 2018 13:36:30 +0000 Subject: [PATCH] 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 --- app/controllers/mail_handler_controller.rb | 2 +- lib/tasks/email.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5