Project

General

Custom queries

Profile

Actions

Bug #2855

closed

API authentication controller does not fail gracefully

Added by Daniel Lobato Garcia almost 12 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
API
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

This controller (api/services/api/authorization) gives you the option of using OAuth or http basic. If http basic is used but no username/password are set, foreman returns a 500 when it tries to authenticate the API request.

Processing by Api::V1::HostsController#show as JSON
Parameters: {"id"=>"host.domain.com", "host"=>{}}
invalid byte sequence in UTF-8 (ArgumentError)


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #3587: invalid JSON returns 500 server errorClosedOhad Levy11/06/2013Actions
Is duplicate of Foreman - Bug #3025: Supplying no HTTP auth credentials results in server errorDuplicate09/04/2013Actions

Added by Ohad Levy over 11 years ago

Revision b18c3a35 (diff)

fixes #3587, #2855 - print an error on invalid json vs 500 error

Actions

Also available in: Atom PDF