diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-13 15:37:30 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-13 15:37:30 +0200 |
commit | 94a84b4c2f78a2375fae3460169cb161b3d702a6 (patch) | |
tree | 18b2674219aa4919406301eabfffc2e8c48c6c7f | |
parent | 125679b35e66f32cc4d7a1878222de4ebb3f69cd (diff) |
Fixed generating session IDs.
-rw-r--r-- | session.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8,7 +8,7 @@ class Session(object): cookie = Cookie.SimpleCookie(environ['HTTP_COOKIE'] if 'HTTP_COOKIE' in environ else None) sessionid = cookie.get('sessionid') if not sessionid: - sessionid = hashlib.sha1(str(time.time) + environ['REMOTE_ADDR']).hexdigest() + sessionid = hashlib.sha1(str(time.time()) + environ['REMOTE_ADDR']).hexdigest() cookie['sessionid'] = sessionid start_response('302 Found', [ ('Set-Cookie', cookie['sessionid'].OutputString()), |