diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/actionmailer_patches.rb | 15 | ||||
-rw-r--r-- | lib/alaveteli_external_command.rb | 6 | ||||
-rw-r--r-- | lib/i18n_fixes.rb | 2 |
3 files changed, 6 insertions, 17 deletions
diff --git a/lib/actionmailer_patches.rb b/lib/actionmailer_patches.rb deleted file mode 100644 index 600d3c8cc..000000000 --- a/lib/actionmailer_patches.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Monkey patch for CVE-2013-4389 -# derived from http://seclists.org/oss-sec/2013/q4/118 to fix -# a possible DoS vulnerability in the log subscriber component of -# Action Mailer. - -require 'action_mailer' -module ActionMailer - class LogSubscriber < ActiveSupport::LogSubscriber - def deliver(event) - recipients = Array.wrap(event.payload[:to]).join(', ') - info("\nSent mail to #{recipients} (#{event.duration.round(1)}ms)") - debug(event.payload[:mail]) - end - end -end diff --git a/lib/alaveteli_external_command.rb b/lib/alaveteli_external_command.rb index fbdee8a62..086a461c8 100644 --- a/lib/alaveteli_external_command.rb +++ b/lib/alaveteli_external_command.rb @@ -44,7 +44,11 @@ module AlaveteliExternalCommand end xc.run(opts[:stdin_string] || "", opts[:env] || {}) - if xc.status != 0 + if !xc.exited + # Crash or timeout + $stderr.puts("#{program_name} #{args.join(' ')}:exited abnormally") + return nil + elsif xc.status != 0 # Error $stderr.puts("Error from #{program_name} #{args.join(' ')}:") $stderr.print(xc.err) diff --git a/lib/i18n_fixes.rb b/lib/i18n_fixes.rb index 9f0849e75..64c370477 100644 --- a/lib/i18n_fixes.rb +++ b/lib/i18n_fixes.rb @@ -35,7 +35,7 @@ def gettext_interpolate(string, values) pattern, key = $1, $1.to_sym if !values.include?(key) - raise I18n::MissingInterpolationArgument.new(pattern, string) + raise I18n::MissingInterpolationArgument.new(pattern, string, values) else v = values[key].to_s if safe && !v.html_safe? |