mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
re-set the _session_id cookie updating the expires time
This commit is contained in:
parent
5d85af9adf
commit
a6ab62f7ce
1 changed files with 8 additions and 1 deletions
|
@ -223,7 +223,14 @@ class Auth(JSONComponent):
|
|||
else:
|
||||
session = config["sessions"][session_id]
|
||||
auth_level = session["level"]
|
||||
session["expires"] = int(time.time()) + config["session_timeout"]
|
||||
expires = int(time.time()) + config["session_timeout"]
|
||||
expires_str = time.strftime('%a, %d %b %Y %H:%M:%S UTC',
|
||||
time.gmtime(expires))
|
||||
session["expires"] = expires
|
||||
|
||||
_session_id = request.getCookie("_session_id")
|
||||
request.addCookie('_session_id', _session_id,
|
||||
path="/json", expires=expires_str)
|
||||
|
||||
if method:
|
||||
if not hasattr(method, "_json_export"):
|
||||
|
|
Loading…
Add table
Reference in a new issue