Avoid disclosure of internal hostname via Message-ID header of mails

Use the host of default_url_options for generating that header instead.
This commit is contained in:
Patrick Gansterer 2017-08-18 00:52:34 +02:00
parent 3f7efbc4b9
commit d93aa23d1c

View file

@ -76,6 +76,7 @@ class Mailer < ActionMailer::Base
end
def mail(args)
args[:message_id] = "#{Mail.random_tag}@#{default_url_options[:host]}" unless args[:message_id]
args[:subject] = "[#{FoodsoftConfig[:name]}] #{args[:subject]}"
if args[:from].is_a? User