Sha256: 7d3c822ee9858c7040152026f924725d9b4dbde43bb7d6fdb9c69282f13e0a2a

Contents?: true

Size: 870 Bytes

Versions: 2

Compression:

Stored size: 870 Bytes

Contents

require 'railroader/checks/base_check'

#Check for versions with vulnerable html escape method
#http://groups.google.com/group/rubyonrails-security/browse_thread/thread/56bffb5923ab1195
class Railroader::CheckEscapeFunction < Railroader::BaseCheck
  Railroader::Checks.add self

  @description = "Checks for versions before 2.3.14 which have a vulnerable escape method"

  def run_check
    if version_between?('2.0.0', '2.3.13') and RUBY_VERSION < '1.9.0' 

      warn :warning_type => 'Cross-Site Scripting',
        :warning_code => :CVE_2011_2932,
        :message => 'Versions before 2.3.14 have a vulnerability in escape method when used with Ruby 1.8: CVE-2011-2932',
        :confidence => :high,
        :gem_info => gemfile_or_environment,
        :link_path => "https://groups.google.com/d/topic/rubyonrails-security/Vr_7WSOrEZU/discussion"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
railroader-4.3.5 lib/railroader/checks/check_escape_function.rb
railroader-4.3.4 lib/railroader/checks/check_escape_function.rb