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)

@jamgregory jamgregory force-pushed the additional-crsf-checks branch from 3b764cb to 8d3211f Compare August 9, 2022 10:47
@jamgregory jamgregory force-pushed the additional-crsf-checks branch from 8d3211f to b9426a2 Compare September 21, 2022 11:15
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.

1 participant