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

Clicking on asset produces 422 error #1580

Closed
mbakeryo opened this issue Feb 26, 2018 · 2 comments
Closed

Clicking on asset produces 422 error #1580

mbakeryo opened this issue Feb 26, 2018 · 2 comments
Assignees
Milestone

Comments

@mbakeryo
Copy link

mbakeryo commented Feb 26, 2018

When I try to go to an asset, I get a 422 - The change you wanted was rejected error message.

Steps to reproduce 1) go to https://heliotrope-preview.hydra.lib.umich.edu/northwestern 2) click the Book title link 3) you'll get a 422.

@conorom
Copy link
Contributor

conorom commented Feb 26, 2018

I, [2018-02-26T09:32:54.724276 #13907]  INFO -- : [b100b90b-55e6-4867-9b49-3dd0e266300f] Started POST "/catalog/tm70mv23c/track?counter=3&locale=en&search_id=28600" for 141.213.175.85 at 2018-02-26 09:32:54 -0500
I, [2018-02-26T09:32:54.727168 #13907]  INFO -- : [b100b90b-55e6-4867-9b49-3dd0e266300f] Processing by CatalogController#track as HTML
I, [2018-02-26T09:32:54.727286 #13907]  INFO -- : [b100b90b-55e6-4867-9b49-3dd0e266300f]   Parameters: {"authenticity_token"=>"u55uxKexKBFKkMyPSa9IMNZseiJAr4X+NXlzjX8XrH9zmaeaABLkRyXlOBKwrxBCFKHmzHIcBMPHbVm55B4wxQ==", "redirect"=>"/concern/file_sets/tm70mv23c?locale=en", "counter"=>"3", "locale"=>"en", "search_id"=>"28600", "id"=>"tm70mv23c"}
W, [2018-02-26T09:32:54.728944 #13907]  WARN -- : [b100b90b-55e6-4867-9b49-3dd0e266300f] Can't verify CSRF token authenticity.
I, [2018-02-26T09:32:54.729640 #13907]  INFO -- : [b100b90b-55e6-4867-9b49-3dd0e266300f] Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.0ms)
F, [2018-02-26T09:32:54.731918 #13907] FATAL -- : [b100b90b-55e6-4867-9b49-3dd0e266300f]
F, [2018-02-26T09:32:54.732010 #13907] FATAL -- : [b100b90b-55e6-4867-9b49-3dd0e266300f] ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
F, [2018-02-26T09:32:54.732127 #13907] FATAL -- : [b100b90b-55e6-4867-9b49-3dd0e266300f]
F, [2018-02-26T09:32:54.732254 #13907] FATAL -- : [b100b90b-55e6-4867-9b49-3dd0e266300f] actionpack (5.1.4) lib/action_controller/metal/request_forgery_protection.rb:195:in `handle_unverified_request'
[b100b90b-55e6-4867-9b49-3dd0e266300f] actionpack (5.1.4) lib/action_controller/metal/request_forgery_protection.rb:227:in `handle_unverified_request'
[b100b90b-55e6-4867-9b49-3dd0e266300f] devise (4.3.0) lib/devise/controllers/helpers.rb:253:in `handle_unverified_request'
[b100b90b-55e6-4867-9b49-3dd0e266300f] actionpack (5.1.4) lib/action_controller/metal/request_forgery_protection.rb:222:in `verify_authenticity_token'

@conorom
Copy link
Contributor

conorom commented Feb 26, 2018

I tried a quick change to protect_from_forgery based on the Rails 5 default behavior suggested by user "boone" here. This didn't fix it but led me to find the possibly-related Hyrax issue:
heartcombo/devise#4085
samvera/hyrax#1191

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

No branches or pull requests

4 participants