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

verify_authenticity_token in Rails 4.2 and above #5

Open
vladimir-e opened this issue Sep 11, 2015 · 0 comments
Open

verify_authenticity_token in Rails 4.2 and above #5

vladimir-e opened this issue Sep 11, 2015 · 0 comments

Comments

@vladimir-e
Copy link

Hi everyone who might be interested,

This example project was very helpful to me, to integrate panda into my project. But recently I updated it to Rails 4.2.4 and this piece of code stopped working:

  def verify_authenticity_token
    handle_unverified_request unless (form_authenticity_token == upload_payload['csrf'])
  end

See panda_controller.rb

I found out that csrf verification API changed a bit and now it should be:

  def verify_authenticity_token
    handle_unverified_request unless valid_authenticity_token?(session, upload_payload['csrf'])
  end

Hope it will be helpful for someone.

Thanks to this answer on SO

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

No branches or pull requests

1 participant