Skip to content

Commit

Permalink
Re-add session sid refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Aug 30, 2023
1 parent 3188949 commit 74a845a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions indico/web/flask/session.py
Expand Up @@ -245,6 +245,10 @@ def save_session(self, app, session, response):
cookie_lifetime = self.get_expiration_time(app, session)
session['_expires'] = datetime.now() + storage_ttl

if refresh_sid:
self.storage.delete(session.sid)
session.sid = self.generate_sid()

session['_secure'] = request.is_secure
self.storage.set(session.sid, self.serializer.dumps(dict(session)), storage_ttl)
response.set_cookie(app.session_cookie_name, session.sid, expires=cookie_lifetime, httponly=True,
Expand Down

0 comments on commit 74a845a

Please sign in to comment.