Patch #29614 ยป replace-receive-with-safe_receive.diff
app/controllers/mail_handler_controller.rb (working copy) | ||
---|---|---|
26 | 26 |
def index |
27 | 27 |
options = params.dup |
28 | 28 |
email = options.delete(:email) |
29 |
if MailHandler.receive(email, options) |
|
29 |
if MailHandler.safe_receive(email, options)
|
|
30 | 30 |
head :created |
31 | 31 |
else |
32 | 32 |
head :unprocessable_entity |
lib/tasks/email.rake (working copy) | ||
---|---|---|
26 | 26 | |
27 | 27 |
task :read => :environment do |
28 | 28 |
Mailer.with_synched_deliveries do |
29 |
MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV)) |
|
29 |
MailHandler.safe_receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
|
|
30 | 30 |
end |
31 | 31 |
end |
32 | 32 |