From: Fredrik Tolf Date: Sun, 5 Aug 2012 05:41:07 +0000 (+0200) Subject: Set expiration properly on session cookies. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=c6e56d74040e480cda56a66f5e52d2ceafce5ca7;p=wrw.git Set expiration properly on session cookies. --- diff --git a/wrw/session.py b/wrw/session.py index 273775b..43b9087 100644 --- a/wrw/session.py +++ b/wrw/session.py @@ -168,7 +168,9 @@ class db(object): return session(threading.RLock()) def mkcookie(self, req, sess): - cookie.add(req, self.cookiename, sess.id, path=self.path) + cookie.add(req, self.cookiename, sess.id, + path=self.path, + expires=cookie.cdate(time.time() + sess.expire)) def fetch(self, req): now = int(time.time())