solved problems with auth and cookie expire
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.6.0-development+timestamp.2013.08.22.02.31.01
|
||||
Version 2.6.0-development+timestamp.2013.08.22.02.36.56
|
||||
|
||||
+4
-1
@@ -917,9 +917,12 @@ class Session(Storage):
|
||||
if response.session_id:
|
||||
rcookies[response.session_id_name] = response.session_id
|
||||
rcookies[response.session_id_name]['path'] = '/'
|
||||
if response.session_cookie_expires:
|
||||
if isinstance(response.session_cookie_expires,datetime.datetime):
|
||||
rcookies[response.session_id_name]['expires'] = \
|
||||
response.session_cookie_expires.strftime(FMT)
|
||||
elif isinstance(response.session_cookie_expires,str):
|
||||
rcookies[response.session_id_name]['expires'] = \
|
||||
response.session_cookie_expires
|
||||
|
||||
def clear(self):
|
||||
previous_session_hash = self.pop('_session_hash', None)
|
||||
|
||||
+1
-2
@@ -1225,8 +1225,7 @@ class Auth(object):
|
||||
response = current.response
|
||||
if auth and auth.remember:
|
||||
# when user wants to be logged in for longer
|
||||
response.cookies[response.session_id_name]["expires"] = \
|
||||
auth.expiration
|
||||
response.session_cookie_expires = auth.expiration
|
||||
if signature:
|
||||
self.define_signature()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user