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'
Updated by Lukas Zapletal over 11 years ago
- Target version changed from 1.3.0 to 1.4.0
Updated by Lukas Zapletal over 11 years ago
- Has duplicate Bug #2855: API authentication controller does not fail gracefully added
Actions