Secret GET /payload returns 500 when no Accept header

Bug #1462681 reported by Steve Heyman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Critical
Steve Heyman
Kilo
Fix Committed
Critical
Douglas Mendizábal

Bug Description

Issuing a secret GET with /payload and no Accept http header (or a blank Accept header value) returns an http 500 error.

This happens in the secrets controller _on_get_secret_payload because the pecan.request.accept object is a webob.acceptparse.MIMENilAccept and barbican is attempting to access pecan.request.accept.header_value.

Should default to application/octet-stream if there is no accept header.

Steve Heyman (sheyman)
Changed in barbican:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

Fix proposed to branch: master
Review: https://review.openstack.org/189048

Changed in barbican:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/189048
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=d0349286e779dfa2eb73ef9e02b7f0d2dab6d4f4
Submitter: Jenkins
Branch: master

commit d0349286e779dfa2eb73ef9e02b7f0d2dab6d4f4
Author: Steve Heyman <email address hidden>
Date: Sat Jun 6 16:01:23 2015 -0500

    Fix http 500 when no accept header passed to secret GET /payload

    Update secrets controller to catch the situation where no Accept
    http header value is passed (or a blank value is passed).

    Default to application/octet-stream as the Accept: header is not
    required.

    Change-Id: Icb940df639fb98ee594e3a2b227ed3f753d28517
    Closes-Bug: 1462681

Changed in barbican:
status: In Progress → Fix Committed
Changed in barbican:
milestone: none → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/192202

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (stable/kilo)

Reviewed: https://review.openstack.org/192202
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=a7fde010bc2ff3a64125b657f90cc464c9e396c0
Submitter: Jenkins
Branch: stable/kilo

commit a7fde010bc2ff3a64125b657f90cc464c9e396c0
Author: Steve Heyman <email address hidden>
Date: Sat Jun 6 16:01:23 2015 -0500

    Fix http 500 when no accept header passed to secret GET /payload

    Update secrets controller to catch the situation where no Accept
    http header value is passed (or a blank value is passed).

    Default to application/octet-stream as the Accept: header is not
    required.

    Change-Id: Icb940df639fb98ee594e3a2b227ed3f753d28517
    Closes-Bug: 1462681
    (cherry picked from commit d0349286e779dfa2eb73ef9e02b7f0d2dab6d4f4)

Changed in barbican:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in barbican:
milestone: liberty-1 → 1.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.