shopify_app: raise: false in WebhookVerification breaks in Rails 4
https://github.com/Shopify/shopify_app/blob/v7.0.11/lib/shopify_app/webhook_verification.rb#L6
skip_before_filter :verify_authenticity_token works but skip_before_filter :verify_authenticity_token, raise: false gives CSRF error
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 18 (13 by maintainers)
Commits related to this issue
- https://github.com/Shopify/shopify_app/issues/304 — committed to Beans0063/shopify_app by Beans0063 8 years ago
I suppose this is happening because of https://github.com/rails/rails/blob/v4.2.6/activesupport/lib/active_support/callbacks.rb#L674-L677 in Rails 4:
The callback is being reinserted into the chain because
raise: falsemakesoptions.any?returntrue. In Rails 5 the conditional isif callback && (options.key?(:if) || options.key?(:unless)), soraise: falsedoesn’t reinsert it.