fix base64.encodestring (py3)

This commit is contained in:
Emmanuel Viennet 2021-08-20 10:53:24 +02:00
parent e61af69f6d
commit 145ecd13b3

View File

@ -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