From 145ecd13b340e50c0394912561483bde810ebe3a Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 20 Aug 2021 10:53:24 +0200 Subject: [PATCH] fix base64.encodestring (py3) --- app/scodoc/sco_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index deb258bf..ac7b7c48 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -571,8 +571,7 @@ def check_scodoc7_password(scodoc7_hash, password): used only during old databases migrations""" m = md5() m.update(password.encode("utf-8")) - # encodestring à remplacer par encodebytes #py3 - h = base64.encodestring(m.digest()).decode("utf-8").strip() + h = base64.encodebytes(m.digest()).decode("utf-8").strip() return h == scodoc7_hash