diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index 679c6c7e..3d1b4fb5 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -140,7 +140,6 @@ class ConfigManager(dict): self.config['SESSION_STORAGE_URL'] = 'redis://{0}/3'.format(self.config['REDIS_ADDRESS']) self.config['SESSION_COOKIE_SAMESITE'] = 'Strict' self.config['SESSION_COOKIE_HTTPONLY'] = True - self.config['SESSION_KEY_BITS'] = 128 self.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=int(self.config['SESSION_LIFETIME'])) # update the app config itself app.config = self diff --git a/core/admin/mailu/utils.py b/core/admin/mailu/utils.py index 30725ff7..214a9a2d 100644 --- a/core/admin/mailu/utils.py +++ b/core/admin/mailu/utils.py @@ -260,9 +260,8 @@ class MailuSessionConfig: hash_bytes = bits//8 + (bits%8>0) time_bytes = 4 # 32 bit timestamp for now - shaker = hashlib.shake_256 if bits>128 else hashlib.shake_128 - self._shaker = shaker(want_bytes(app.config.get('SECRET_KEY', ''))) + self._shaker = hashlib.shake_128(want_bytes(app.config.get('SECRET_KEY', ''))) self._hash_len = hash_bytes self._hash_b64 = len(self._encode(bytes(hash_bytes))) self._key_min = 2*self._hash_b64