No handling for session expire

Bug #1224458 reported by Radomir Dopieralski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Radomir Dopieralski
tuskar-ui
Fix Released
High
Radomir Dopieralski

Bug Description

When the login session expires, and I try to perform any operation, for example create a resource class, I get the generic "Error: An error occurred. Please try again later." and this traceback in the logs:

Traceback:
File "/home/sheep/devel/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  187. response = middleware_method(request, response)
File "/home/sheep/devel/horizon/horizon/middleware.py" in process_response
  117. queued_msgs = request.horizon['async_messages']

Exception Type: AttributeError at /infrastructure/resource_classes/create/
Exception Value: 'WSGIRequest' object has no attribute 'horizon'

It could be better to have me redirected to the login page instead.

Changed in tuskar-ui:
status: New → Triaged
importance: Undecided → High
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/53113

Changed in horizon:
assignee: nobody → Radomir Dopieralski (thesheep)
status: New → In Progress
Changed in tuskar-ui:
assignee: nobody → Radomir Dopieralski (thesheep)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/53113
Committed: http://github.com/openstack/horizon/commit/7d72e5f3a40379285dd4b95f24934699c6ca4a21
Submitter: Jenkins
Branch: master

commit 7d72e5f3a40379285dd4b95f24934699c6ca4a21
Author: Radomir Dopieralski <email address hidden>
Date: Tue Oct 22 15:11:18 2013 +0200

    Fix AttributeError on Ajax calls with expired session

    When the session expires and horizon does an Ajax call (for example,
    to get a modal window), an exception is raised instead of redirecting
    to the login screen, because the exception handler in the horizon
    middleware doesn't add the "horizon" attribute to the request. This is
    a very simple fix to avoid throwing the exception.

    Change-Id: I663999dd616b1a4fa3292615eecf3cc44c3e808a
    Closes-bug: #1224458

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