Actions
Bug #3025
closedSupplying no HTTP auth credentials results in server error
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Authentication
Target version:
-
Description
An error in the controller is showing up when accessing the API without supplying any credentials for HTTP auth.
$ curl -s -H 'Accept: application/json' http://0.0.0.0:3000/api/hosts | json_reformat { "error": { "message": "undefined method `user' for nil:NilClass" } }
Started GET "/api/hosts" for 127.0.0.1 at 2013-09-04 20:47:42 +0100 Processing by Api::V1::HostsController#index as JSON undefined method `user' for nil:NilClass (NoMethodError) /home/dcleal/code/foreman/foreman/app/controllers/api/base_controller.rb:81:in `authorize'
Actions