expiration check is using different timezone other than UTC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-keystoneclient |
Fix Released
|
Medium
|
Bryan Davidson |
Bug Description
It seems we are using local time to compare the UTC token expiration time for expiration check.
I am trying using the patch following:
diff --git a/keystoneclien
index 1b82cfa..a9fa54c 100644
--- a/keystoneclien
+++ b/keystoneclien
@@ -937,7 +937,8 @@
else:
raise InvalidUserToke
expires = timeutils.
- if time.time() >= float(expires):
+ utcnow = timeutils.
+ if float(utcnow) >= float(expires):
raise InvalidUserToke
return expires
but I am not sure if it is a problem and cannot assess the scope of impact.
Changed in keystone: | |
assignee: | yong sheng gong (gongysh) → Alex Meade (alex-meade) |
status: | Confirmed → In Progress |
Changed in python-keystoneclient: | |
assignee: | Alex Meade (alex-meade) → nikhil komawar (nikhil-komawar) |
Changed in python-keystoneclient: | |
assignee: | nikhil komawar (nikhil-komawar) → Bryan Davidson (bryan-davidson) |
Changed in python-keystoneclient: | |
assignee: | Bryan Davidson (bryan-davidson) → nikhil komawar (nikhil-komawar) |
Changed in python-keystoneclient: | |
assignee: | nikhil komawar (nikhil-komawar) → Bryan Davidson (bryan-davidson) |
Changed in python-keystoneclient: | |
milestone: | none → 0.3.3 |
Changed in python-keystoneclient: | |
assignee: | Bryan Davidson (bryan-davidson) → Alex Meade (alex-meade) |
Changed in python-keystoneclient: | |
assignee: | Alex Meade (alex-meade) → Bryan Davidson (bryan-davidson) |
Changed in python-keystoneclient: | |
milestone: | 0.3.3 → 0.4.0 |
Changed in python-keystoneclient: | |
status: | Fix Committed → Fix Released |
My time zone is GMT+8, I am running following in python console to verify it: openstack. common import timeutils utcnow( ).strftime( '%s') utcnow( ).strftime( '%s')
>>> from keystoneclient.
>>> import time
>>> print time.time()
1372461272.58
>>> print timeutils.
1372432495
>>> print time.time(), timeutils.
1372461312.73 1372432512
>>> print (1372461312 - 1372432512)/3600
8