summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-08-13 15:37:30 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-08-13 15:37:30 +0200
commit94a84b4c2f78a2375fae3460169cb161b3d702a6 (patch)
tree18b2674219aa4919406301eabfffc2e8c48c6c7f
parent125679b35e66f32cc4d7a1878222de4ebb3f69cd (diff)
Fixed generating session IDs.
-rw-r--r--session.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/session.py b/session.py
index 9928992..0787be8 100644
--- a/session.py
+++ b/session.py
@@ -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()),