Project

General

Profile

Actions

Bug #2855

closed

API authentication controller does not fail gracefully

Added by Daniel Lobato Garcia over 10 years ago. Updated over 5 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
Actions #1

Updated by Lukas Zapletal over 10 years ago

  • Category set to API
  • Target version set to 1.3.0
  • Difficulty set to easy
Actions #2

Updated by Lukas Zapletal over 10 years ago

  • Is duplicate of Bug #3025: Supplying no HTTP auth credentials results in server error added
Actions #3

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Duplicate
Actions #4

Updated by Dominic Cleal over 10 years ago

  • Assignee set to Ohad Levy
  • Target version changed from 1.3.0 to 1.15.0
  • translation missing: en.field_release set to 2
  • Description updated (diff)
  • Status changed from Duplicate to Ready For Testing

Oops, I set both to duplicate.

Ohad's addressed it in https://github.com/theforeman/foreman/pull/1003 so it returns a 401.

Actions #5

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #3587: invalid JSON returns 500 server error added
Actions #6

Updated by Ohad Levy over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF