Infinite recursion in requests w/Origin header

Bug #1270039 reported by Samuel Merritt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
David Goetz

Bug Description

If you make an object GET request with the Origin header set, you wind up with cors_validation and get_info calling each other in a mutually-recursive death spiral.

The horrifying thing is that it doesn't fail the request; somehow, something eats the stack overflow and and it all works out. It does slow things down a bunch though.

Changed in swift:
assignee: nobody → David Goetz (david-goetz)
Changed in swift:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/66883
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=04b1af215e152ed559a72fe5a521fae753944f65
Submitter: Jenkins
Branch: master

commit 04b1af215e152ed559a72fe5a521fae753944f65
Author: David Goetz <email address hidden>
Date: Tue Jan 14 12:51:40 2014 -0800

    Drop origin from get_info calls

    The reason for this is that having origin in the get_info calls causes an
    infinite loop. The way that code was written it relies on GETorHEAD_base to
    populate the data- the only problem is that the HEAD call is wrapped by
    cors_validation which calls get_info and round and round we go. imo get_info
    should be refactored to not work this way (relying on this other call to do
    stuff behind scenes and then magically your stuff is there) because it seems
    pretty prone to breaking. But I'll let somebody else do that :).

    Fixes bug 1270039

    Change-Id: Idad3cedd965e0d5fb068b062fe8fef301c87b75a

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.12.0
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/ec)

Fix proposed to branch: feature/ec
Review: https://review.openstack.org/70442

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.