Sha256: 7b80b4f66941ea2caa7069fb31e8c257ff3348a3d19767c15c116b4db1748bdb

Contents?: true

Size: 985 Bytes

Versions: 2

Compression:

Stored size: 985 Bytes

Contents

# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: false

if defined?(Rails) && defined?(Rails::Application) && defined?(Rails::Application::Configuration)
  module Rails
    class Application
      # Our patch into the Rails::Application::Configuration Class, allowing
      # for the runtime detection of insecure configurations on individual
      # ActionDispatch::Session::AbstractStore instances within the
      # application.
      class Configuration
        include Contrast::Utils::InvalidConfigurationUtil
        include Contrast::Components::Interface

        access_component :analysis, :scope

        alias_method :cs__patched_session_store, :session_store
        def session_store *args
          ret = cs__patched_session_store(*args)
          Contrast::Utils::RailsAssessConfiguration.analyze_session_store(*args)
          ret
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
contrast-agent-3.8.5 lib/contrast/rails_extensions/assess/configuration.rb
contrast-agent-3.8.4 lib/contrast/rails_extensions/assess/configuration.rb