]> source.dussan.org Git - redmine.git/commitdiff
redmine:email:read and rdm-mailhandler.rb should use safe_receive instead of receive...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Sep 2018 13:36:30 +0000 (13:36 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Sep 2018 13:36:30 +0000 (13:36 +0000)
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
lib/tasks/email.rake

index ccb832e7a314fe6ca48bd1d0bcdecbce85523e0c..1942ab1b764284d4a0d3adc58d15b85b824ade84 100644 (file)
@@ -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
index 86ef628e87673e783b98862cab6fd5cf83169f2e..3c57f1af8c945903a8dfc02ae7506a5c20885070 100644 (file)
@@ -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