Merge pull request #49426 from skipkayhil/hm-rm-default-forgery-accessor

Rm unused default_protect_from_forgery accessor
This commit is contained in:
Rafael Mendonça França 2023-09-28 21:32:23 -04:00 committed by GitHub
commit deb0869f3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 5 deletions

@ -90,10 +90,6 @@ module RequestForgeryProtection
config_accessor :per_form_csrf_tokens
self.per_form_csrf_tokens = false
# Controls whether forgery protection is enabled by default.
config_accessor :default_protect_from_forgery
self.default_protect_from_forgery = false
# The strategy to use for storing and retrieving CSRF tokens.
config_accessor :csrf_token_storage_strategy
self.csrf_token_storage_strategy = SessionStore.new

@ -77,6 +77,7 @@ class Railtie < Rails::Railtie # :nodoc:
# Configs used in other initializers
filtered_options = options.except(
:default_protect_from_forgery,
:log_query_tags_around_actions,
:permit_all_parameters,
:action_on_unpermitted_parameters,

@ -1747,7 +1747,6 @@ def create
test "config.action_controller.default_protect_from_forgery is true by default" do
app "development"
assert_equal true, ActionController::Base.default_protect_from_forgery
assert_includes ActionController::Base.__callbacks[:process_action].map(&:filter), :verify_authenticity_token
end