Skip to content

Commit

Permalink
Merge pull request from GHSA-5629-8855-gf4g
Browse files Browse the repository at this point in the history
Add extra security layer for GHSA-xm34-v85h-9pg2 in solidus_auth_devise
  • Loading branch information
waiting-for-dev committed Nov 17, 2021
2 parents a5949e2 + bbd3512 commit dcace31
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/lib/spree/core/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ class Engine < ::Rails::Engine
config.after_initialize do
Spree::Config.check_load_defaults_called('Spree::Config')
end

config.after_initialize do
if defined?(Spree::Auth::Engine) &&
Gem::Version.new(Spree::Auth::VERSION) < Gem::Version.new('2.5.4') &&
defined?(Spree::UsersController)
Spree::UsersController.protect_from_forgery with: :exception
end
end
end
end
end

0 comments on commit dcace31

Please sign in to comment.