Skip to content

Danger, I think I found a vulnerability #57

@michelson

Description

@michelson

Hi , it seems that the cypress configuration for middleware defaults to true
https://github.com/shakacode/cypress-on-rails/blob/master/lib/cypress_on_rails/configuration.rb#L10

I've added the configuration on the initializer but the railitie runs first, so the setting is always true !. This is a serious vulnerability.

The Railtie has to initialize the configuration on after_initializer , instead initializer this way will hook the user's configuration

module CypressOnRails
 class Railtie < Rails::Railtie
   config.after_initialize do |app|
     if CypressOnRails.configuration.use_middleware?
         app.middleware.use Middleware
       end
    end
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions