Horizon does not propagate logout_reason messages for ajax calls

Bug #1298074 reported by David Lapsley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
David Lapsley

Bug Description

Horizon propagates logout_reason messages by setting a "logout_reason" cookie in the response. After the user is redirected to logout, the login view is rendered, and the logout_reason appears in the message portion of the login screen.

In the case of the response to an ajax request, a redirect to logout results in the creation of a new HttpResponse in horizon.middleware.HorizonMiddleware.process_request() which is then returned to the requestor. The logout_reason cookie from the incoming response is not copied over. In this case, the logout_reason will be lost.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: nobody → David Lapsley (dlapsley)
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/83227
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=013676583d388c0717fe405a18881b41d3155545
Submitter: Jenkins
Branch: master

commit 013676583d388c0717fe405a18881b41d3155545
Author: David Lapsley <email address hidden>
Date: Wed Mar 26 14:37:48 2014 -0700

    Propagate logout_reason messages

    For ajax requests, horizon.middleware does not currently copy the
    logout_reason cookie into newly generated redirect_responses. This
    will result in lost logout_reason messages when a user is redirected
    to logout.

    This patch adds the logout_reason cookie to the list of cookies
    copied over from the incoming response to the newly created
    outgoing response.

    Change-Id: I089eff5627f870c8b3f0b7913693231602a8f9d4
    Closes-Bug: #1298074

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-1 → 2014.2
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.