regenerate() shouldn't extend lifetime

master
Florent Daigniere 3 years ago
parent 5fe5c80064
commit 5f313310d4

@ -246,12 +246,8 @@ class MailuSession(CallbackDict, SessionMixin):
def regenerate(self): def regenerate(self):
""" generate new id for session to avoid `session fixation`. """ """ generate new id for session to avoid `session fixation`. """
self.delete() self.delete()
self._sid = None self._sid = None
self._created = self.app.session_config.gen_created()
self.modified = True self.modified = True
def delete(self): def delete(self):
@ -262,9 +258,7 @@ class MailuSession(CallbackDict, SessionMixin):
def save(self): def save(self):
""" Save session to store. """ """ Save session to store. """
set_cookie = False set_cookie = False
# set uid from dict data # set uid from dict data
if self._uid is None: if self._uid is None:
self._uid = self.app.session_config.gen_uid(self.get('_user_id', '')) self._uid = self.app.session_config.gen_uid(self.get('_user_id', ''))

Loading…
Cancel
Save