1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-18 15:54:56 +00:00

Fix for (#3111) exception on python 3.8/3.9 during storing of remember me cookie

This commit is contained in:
Ozzie Isaacs 2024-07-30 18:51:52 +02:00
parent b2f5853b12
commit 0ff3f0f426

View File

@ -397,7 +397,7 @@ class LoginManager:
def _load_user_from_remember_cookie(self, cookie):
signer_kwargs = dict(
key_derivation="hmac", digest_method=staticmethod(hashlib.sha1)
key_derivation="hmac", digest_method=hashlib.sha1
)
try:
remember_dict = URLSafeSerializer(
@ -482,7 +482,7 @@ class LoginManager:
# prepare data
max_age = int(current_app.permanent_session_lifetime.total_seconds())
signer_kwargs = dict(
key_derivation="hmac", digest_method=staticmethod(hashlib.sha1)
key_derivation="hmac", digest_method=hashlib.sha1
)
# save
data = URLSafeSerializer(