mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-10 01:13:33 +00:00
Fix for (#3111) exception on python 3.8/3.9 during storing of remember me cookie
This commit is contained in:
parent
b2f5853b12
commit
0ff3f0f426
@ -397,7 +397,7 @@ class LoginManager:
|
|||||||
|
|
||||||
def _load_user_from_remember_cookie(self, cookie):
|
def _load_user_from_remember_cookie(self, cookie):
|
||||||
signer_kwargs = dict(
|
signer_kwargs = dict(
|
||||||
key_derivation="hmac", digest_method=staticmethod(hashlib.sha1)
|
key_derivation="hmac", digest_method=hashlib.sha1
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
remember_dict = URLSafeSerializer(
|
remember_dict = URLSafeSerializer(
|
||||||
@ -482,7 +482,7 @@ class LoginManager:
|
|||||||
# prepare data
|
# prepare data
|
||||||
max_age = int(current_app.permanent_session_lifetime.total_seconds())
|
max_age = int(current_app.permanent_session_lifetime.total_seconds())
|
||||||
signer_kwargs = dict(
|
signer_kwargs = dict(
|
||||||
key_derivation="hmac", digest_method=staticmethod(hashlib.sha1)
|
key_derivation="hmac", digest_method=hashlib.sha1
|
||||||
)
|
)
|
||||||
# save
|
# save
|
||||||
data = URLSafeSerializer(
|
data = URLSafeSerializer(
|
||||||
|
Loading…
Reference in New Issue
Block a user