Actions
Bug #3524
closedCannot reference smart proxies by name when they contain a "."
Description
When trying to reference a smart proxy by name in the API and the name contains a full stop/period/"." then Foreman can't find the proxy resource.
Note in this example it's stripping off the ".fm" suffix:
GET http://0.0.0.0:3000/api/smart_proxies/foreman.fm => "Resource smart_proxy not found by id 'foreman'"
Started GET "/api/smart_proxies/foreman.fm" for 127.0.0.1 at 2013-10-25 15:24:03 +0100 Processing by Api::V1::SmartProxiesController#show as Parameters: {"id"=>"foreman", "smart_proxy"=>{}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Setting current user thread-local variable to admin SmartProxy Load (0.1ms) SELECT "smart_proxies".* FROM "smart_proxies" WHERE "smart_proxies"."name" = 'foreman' ORDER BY smart_proxies.name LIMIT 1 Rendered api/v1/errors/not_found.json.rabl (0.4ms) Filter chain halted as :find_resource rendered or redirected Completed 404 Not Found in 7ms (Views: 5.1ms | ActiveRecord: 0.3ms)
Actions