From f0247a2faf72740acf66237680be1ca766f702c3 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Tue, 21 Dec 2021 15:45:05 +0100 Subject: [PATCH] Use self where appropriate --- core/admin/mailu/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/admin/mailu/utils.py b/core/admin/mailu/utils.py index e4dc4d07..087357a5 100644 --- a/core/admin/mailu/utils.py +++ b/core/admin/mailu/utils.py @@ -268,9 +268,9 @@ class MailuSession(CallbackDict, SessionMixin): self._sid = self.app.session_config.gen_sid() set_cookie = True if 'webmail_token' in self: - app.session_store.put(self['webmail_token'], + self.app.session_store.put(self['webmail_token'], self.sid, - app.config['PERMANENT_SESSION_LIFETIME'], + self.app.config['PERMANENT_SESSION_LIFETIME'], ) # get new session key @@ -357,7 +357,7 @@ class MailuSessionConfig: if now is None: now = int(time.time()) created = int.from_bytes(created, byteorder='big') - if not created <= now <= created + app.config['PERMANENT_SESSION_LIFETIME']: + if not created <= now <= created + self.app.config['PERMANENT_SESSION_LIFETIME']: return None return (uid, sid, crt)