Expires comparison raises TypeError in middleware.auth_token

Bug #911197 reported by Tiantian Gao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Ziad Sawalha

Bug Description

The method '_cache_put' set the Expires to float, but when _cache_get get the Expires ,it can't compare a float and a datetime.
-----------------------
 if expires <= datetime.now():
TypeError: can't compare datetime.datetime to float

Tiantian Gao (gtt116)
Changed in keystone:
status: New → Confirmed
status: Confirmed → New
Dolph Mathews (dolph)
summary: - Expires compare raise Exception in middleware.auth_token
+ Expires comparison raises TypeError in middleware.auth_token
Revision history for this message
Ziad Sawalha (ziad-sawalha) wrote :

Should be addressed by https://review.openstack.org/3185

Changed in keystone:
assignee: nobody → Ziad Sawalha (ziad-sawalha)
milestone: none → essex-3
importance: Undecided → High
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/3185
Committed: http://github.com/openstack/keystone/commit/8c98285ad0c1b24efe35a3ea777da58fb0d67054
Submitter: Jenkins
Branch: master

commit 8c98285ad0c1b24efe35a3ea777da58fb0d67054
Author: Ziad Sawalha <email address hidden>
Date: Thu Jan 19 11:19:13 2012 -0600

    Fixes 918535: time not properly parsed in auth_token middleware

    - replaced get_datetime() with expanded _convert_datetime()
      function that uses datutil parser to handle any date
      string.
    - added tests
    - fixes bug 918535
    - also addresses bug 911197

    Change-Id: I7f4e3c01b1b7466fd5f30889c7b28deae9fc9367

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-3 → 2012.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.