Actions
Defect #15424
closedFilter chain halted as :verify_authenticity_token rendered or redirected
Defect #15424:
Filter chain halted as :verify_authenticity_token rendered or redirected
Status:
Closed
Priority:
High
Assignee:
-
Category:
REST API
Target version:
-
Resolution:
Duplicate
Affected version:
Description
When executing a post request to creat a User using a Java Jersey client and the API access key, I get the following error:
Started POST "/users.xml?key=984434......." for 194.208.16.210 at 2013-11-21 10:01:43 +0100
Processing by UsersController#create as XML
Parameters: {"user"=>{"id"=>"0", "login"=>"jdoe", "firstname"=>"John", "lastname"=>"Doe", "mail"=>"john@doe.at", "password"=>"[FILTERED]", "created_on"=>"2013-11-21T10:01:43.650+01:00"}, "key"=>"984434......."}
WARNING: Can't verify CSRF token authenticity
API calls must include a proper Content-type header (application/xml or application/json).
Filter chain halted as :verify_authenticity_token rendered or redirected
Completed 422 Unprocessable Entity in 0.4ms (ActiveRecord: 0.0ms)
I do not find a way to get the resp. Token via REST, is there even one provided?
According to http://stackoverflow.com/questions/10167956/rails-shows-warning-cant-verify-csrf-token-authenticity-from-a-restkit-post it would be safe to remove :verify_authenticity_token for calls coming via API.
Files
Actions