Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional CSRF deactivation checks #1720

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jamgregory
Copy link
Contributor

@jamgregory jamgregory commented Jul 6, 2022

This MR adds additional CSRF deactivation checks as detailed in #1545:

  • config.action_controller.allow_forgery_protection = false
  • skip_before_action :verify_authenticity_token
  • protect_from_forgery except: :index
  • protect_from_forgery only: :show
  • protect_from_forgery if: -> { ... }
  • protect_from_forgery unless: -> { ... }

(this also includes the work in #1719 as that's required for the new checks to function correctly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant