Cookie 'max_age' must be a integer, not a string.
authorChristophe de Vienne <christophe@unlish.com>
Mon, 08 Dec 2014 20:21:55 +0100
changeset 11527 aa05b41a5816
parent 11526 5c59f0c8fbd1
child 11528 0a7769e583c2
Cookie 'max_age' must be a integer, not a string. If not, the value is used verbatim for the 'expires' of the cookie, which is invalid. Closes #4731764.
pyramid_cubicweb/login.py
--- a/pyramid_cubicweb/login.py	Sat Nov 15 21:07:25 2014 +0100
+++ b/pyramid_cubicweb/login.py	Mon Dec 08 20:21:55 2014 +0100
@@ -35,7 +35,7 @@
 
     max_age = None
     if request.params.get('__setauthcookie') == '1':
-        max_age = '604800'
+        max_age = 604800
     headers = security.remember(request, user_eid, max_age=max_age)
 
     new_path = request.params.get('postlogin_path', '/')